State Management Module
Summary
- The State Management Module allows users to manage AdapTable State at run-time
AdapTable State usually just 'happens' without the User being aware of the persistence mechanism or needing to do anything in particular.
However AdapTable provides the State Management Module to assist managing Adaptable State in the UI.
It primarily allows users to import and export AdapTable State.
It's functionality can be accessed in 3 UI components:
- The
Manage Statesection in the Settings Panel - The
Manage StateToolbar in the Dashboard - The
Manage StateTool Panel in the AdapTable Tool Panel Component
Hint
- It is unlikely that you will want all your users to have access to this feature at run-time
- If so, set the Entitlement to
Hiddenfor those users who do not need this feature
State Functionality
All 3 Manage State components contain 4 State-related options:
- Clearing User State
- Loading Initial Adaptable State (from a JSON file)
- Exporting the AdapTable State - to Clipboard, Console or JSON
- Exporting Initial Adaptable State - to Clipboard, Console or JSON
Caution
Clearing User State will re-load the initial Initial Adaptable State that was provided
Note
- If using Local Storage, AdapTable will automatically clear what is in the User's State
- If using Remote Storage, AdapTable will invoke the
clearStatefunction that was provided at design-time
State Management Module
- This demo opens the State Management page of the Settings Panel
Loading demo…
Reloading Initial State
The Manage State panel allows you to re-apply your Initial Adaptable State using a JSON file.
This is done using the Load Initial Adaptable State button.
When clicked, AdapTable will replace the current State with the State in the uploaded file.
Load Initial Adaptable State
- The demo illustrates how to reload the Initial Adaptable State using the
Manage StateSettings Panel - Initial State includes a Format Column on
Name(blue). Change Format Columns replaces it with runtime styles onGithub StarsandLanguage; reloading from the downloadable file restoresName
Try It Out
- On load, confirm
Nameis styled blue (from Initial State) - Click Change Format Columns —
Namestyling is removed andGithub Stars(yellow) /Language(green) appear instead - Download this file: initial-adaptable-state.json
- Open the Settings Panel using the Manage State module button, and then click Load Initial Adaptable State to select the downloaded file
- Runtime styles disappear and
Name(blue) returns — confirming the Grid was restored from the file
Loading demo…