2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-18 18:56:31 +00:00

[UI] Stored table state (#9902)

* Add useStoredTableState zustand

* Store table page size in the zustand state

* Store tablesorting data in zustand state

* Actually provide records...

* Transfer table names state

* Store hidden columns too
This commit is contained in:
Oliver
2025-06-30 08:13:04 +10:00
committed by GitHub
parent c6d53b8c57
commit f3072b804e
6 changed files with 180 additions and 218 deletions

View File

@@ -52,19 +52,16 @@ export type TableState = {
hasSelectedRecords: boolean;
setSelectedRecords: (records: any[]) => void;
clearSelectedRecords: () => void;
hiddenColumns: string[] | null;
setHiddenColumns: (columns: string[]) => void;
searchTerm: string;
setSearchTerm: (term: string) => void;
recordCount: number;
setRecordCount: (count: number) => void;
page: number;
setPage: (page: number) => void;
pageSize: number;
setPageSize: (pageSize: number) => void;
storedDataLoaded: boolean;
records: any[];
setRecords: (records: any[]) => void;
updateRecord: (record: any) => void;
hiddenColumns: string[];
setHiddenColumns: (columns: string[]) => void;
idAccessor?: string;
};