Store Module

Easily keep data on the client side with this component. The data is not inserted in the DOM. Data can be in memory, localStorage or sessionStorage. The data will be kept with the id as key.

Types

Type Description

Attr

A list of children or a property for this dash component

Prop

• storage_type (value equal to: 'local', 'session', 'memory'; default memory) - The type of the web storage. memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. • data (record | list | number | string | boolean) - The stored data for the id. • clear_data (boolean; default false) - Set to true to remove the data contained in `data_key`. • modified_timestamp (number; default -1) - The last time the storage was modified.

Store

Easily keep data on the client side with this component. The data is not inserted in the DOM. Data can be in memory, localStorage or sessionStorage. The data will be kept with the id as key.

Functions and values

Function or value Description

Store.store id attrs

Full Usage: Store.store id attrs

Parameters:
    id : string
    attrs : Attr list

Returns: DashComponent

Easily keep data on the client side with this component. The data is not inserted in the DOM. Data can be in memory, localStorage or sessionStorage. The data will be kept with the id as key. Properties: • id (string) - The ID of this component, used to identify dash components in callbacks. The ID needs to be unique across all of the components in an app. • storage_type (value equal to: 'local', 'session', 'memory'; default memory) - The type of the web storage. memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. • data (record | list | number | string | boolean) - The stored data for the id. • clear_data (boolean; default false) - Set to true to remove the data contained in `data_key`. • modified_timestamp (number; default -1) - The last time the storage was modified.

id : string
attrs : Attr list
Returns: DashComponent