Skip to content

UIStateStorage Type documentation

Interface that defines a UIStateStore. It must be provided via provideSiUiState .
Methods
Loads data for a specific stateId. Can be asynchronous.

Errors should be handled by the implementation. The SiUIStateService does not handle errors.

Returns The data or undefined if the data does not exist. Asynchronous implementations must return a Promise: Promise containing the data.
Parameters
stateId: string
(stateId: string, data: string) => (void | Promise<void>)
Saves data under a specific stateId. Already existing data for that stateId should be overridden. Asynchronous implementations must return a Promise: Promise and resolve it once saving was completed.

Errors should be handled by the implementation. The SiUIStateService does not handle errors.
Parameters
stateId: string
data: string

Types Documentation

(config: { store: Type<UIStateStorage> }) => Provider[]
Function
Enables the automatic storage of UI state for enabled components.
Parameters
config?: { store: Type<UIStateStorage> }


Except where otherwise noted, content on this site is licensed under MIT License.