StableState
Page state
Overview
Variables that belong to one page — filters, toggles, the current step — separate from other pages.
Purpose
Keep page-specific UI choices local so pages do not interfere with each other, and so the app state stays clean.
Inputs
- Declared in the page settings (Page state) with the same shape as app state (key, type, default, description).
- Changed with Set state / Increase / decrease state (scope: Page state).
Configuration
- Page state starts empty when the app loads; initialise it in the page's On load event with Set state if a starting value matters.
- Use it for filters bound to tables (
Status equals Page state › status) and for show/hide toggles in visibility rules.
Outputs
Page state › keyin the Data Picker,{{pageState.key}}in templates — only on that page.
Example
Show archived toggle
Example
Toggle “Show archived” › On change: Set state Page state › showArchived = Event › value Table (Projects) · Filter: Archived equals Page state › showArchived
Errors
- None.
Limitations
- Not saved anywhere; lost when the browser tab is closed. Values typed in the page settings as defaults are not applied automatically yet.
Advanced
page.pageState: StateVariable[]; runtime storage ispageState[pageId][key]in the Zustand store (setPageState).