diff --git a/client/src/utils/saveload.ts b/client/src/utils/saveload.ts index 35d2dbe..28184b6 100644 --- a/client/src/utils/saveload.ts +++ b/client/src/utils/saveload.ts @@ -18,18 +18,18 @@ export function useInitialTableState(tableId: string): TableState { const savedSorters = hasHashProperty("sorters") ? getHashProperty("sorters") : isLocalStorageAvailable - ? localStorage.getItem(`${tableId}-sorters`) - : null; + ? localStorage.getItem(`${tableId}-sorters`) + : null; const savedFilters = hasHashProperty("filters") ? getHashProperty("filters") : isLocalStorageAvailable - ? localStorage.getItem(`${tableId}-filters`) - : null; + ? localStorage.getItem(`${tableId}-filters`) + : null; const savedPagination = hasHashProperty("pagination") ? getHashProperty("pagination") : isLocalStorageAvailable - ? localStorage.getItem(`${tableId}-pagination`) - : null; + ? localStorage.getItem(`${tableId}-pagination`) + : null; const savedShowColumns = isLocalStorageAvailable ? localStorage.getItem(`${tableId}-showColumns`) : null; const sorters = savedSorters ? JSON.parse(savedSorters) : [{ field: "id", order: "asc" }]; @@ -59,7 +59,7 @@ export function useStoreInitialState(tableId: string, state: TableState) { if (filters.length > 0) { if (isLocalStorageAvailable) { localStorage.setItem(`${tableId}-filters`, JSON.stringify(filters)); - setURLHash("filters", JSON.stringify(state.filters)); + setURLHash("filters", JSON.stringify(filters)); } } else { localStorage.removeItem(`${tableId}-filters`);