Update recoil v4 states to getters (#3451)

Update v4 states to getters

Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
Thomas Trompette
2024-01-15 18:18:55 +01:00
committed by GitHub
parent 4695e99458
commit 4e36c6d584
26 changed files with 169 additions and 135 deletions

View File

@ -26,12 +26,15 @@ export const useObjectRecordTable = (objectNamePlural: string) => {
},
);
const { tableFiltersState, tableSortsState, tableLastRowVisibleState } =
useRecordTableStates();
const {
getTableFiltersState,
getTableSortsState,
getTableLastRowVisibleState,
} = useRecordTableStates();
const tableFilters = useRecoilValue(tableFiltersState());
const tableSorts = useRecoilValue(tableSortsState());
const setLastRowVisible = useSetRecoilState(tableLastRowVisibleState());
const tableFilters = useRecoilValue(getTableFiltersState());
const tableSorts = useRecoilValue(getTableSortsState());
const setLastRowVisible = useSetRecoilState(getTableLastRowVisibleState());
const requestFilters = turnObjectDropdownFilterIntoQueryFilter(
tableFilters,