Implements new record sort CRUD (#10448)
This PR implements new record sorts CRUD as already done on record filters, which is based on record sorts state instead of combined view sorts. It implements a new useSaveRecordSortsToViewSorts with its underlying utils, to compute diff between two view sorts array. The associated unit tests have also been written. This PR also fixes the bug where the view bar disappeared when deleting the already saved record sort of a view.
This commit is contained in:
@ -179,8 +179,8 @@ export const ViewBarDetails = ({
|
||||
|
||||
const shouldExpandViewBar =
|
||||
viewFiltersAreDifferentFromRecordFilters ||
|
||||
((currentViewWithCombinedFiltersAndSorts?.viewSorts?.length ||
|
||||
currentRecordFilters?.length) &&
|
||||
viewSortsAreDifferentFromRecordSorts ||
|
||||
((currentRecordSorts?.length || currentRecordFilters?.length) &&
|
||||
isViewBarExpanded);
|
||||
|
||||
if (!shouldExpandViewBar) {
|
||||
|
||||
Reference in New Issue
Block a user