Optional checkedThe ids of the checked rows.
Optional columnsThe columns in their order (fixed columns included). Columns of the table that are missing here keep their place; unknown properties are ignored.
Optional customData of your application, e.g. the text of a filter field (must be JSON).
Optional detailThe ids of the master rows with an expanded detail row (master/detail).
1.1.97
Optional headerThe state of the header groups with a toggle.
Optional scrollThe scroll position.
Optional selectionThe selection.
Optional sortThe sorted columns, the first one is the primary sort key. [] = unsorted.
Optional treeExpanded / collapsed nodes of a tree table.
Format version, always 1.
The state of a table as plain JSON: column layout, sorting, scroll position, tree, checked and selected rows, header groups and data of your own. Get it with TableApi.getState, apply it with TableApi.applyState or pass it at the start as TableOptionsIf.initialState – e.g. to store it on your server per user. TableOptionsIf.autoRestoreOptions stores it in
localStoragefor you.Every part is optional: a missing part is not applied (the table keeps its current state of that part). Columns are identified by their property, rows by their id (AutoRestoreOptionsIf.getRowId) – never by an index, so the state survives moved columns and rows that arrive in another order. Unknown columns and rows are ignored. The state holds no cell values – but row ids can be personal data (e.g. an e-mail address as id).
Example
Example
See
Training: Remember the state
Since
1.1.92