StableData binding
Component state
Overview
Values a component exposes about itself: the selected row of a table, the value of an input, whether a modal is open, the active tab.
Purpose
Connect components to each other without extra actions: show the selected customer in a Detail View, enable a button only when a row is selected, read a search box from another component.
Inputs
- Data Picker group Component state:
Component name › keyfor every component on the page that exposes state. - Keys by component: Table
page,selectedId,selectedRecord,sort; Data Grid / List / Cards / Search Resultspage,selectedId,selectedRecord; KanbanselectedId,selectedRecord; Calendar / SchedulerselectedDate,selectedId; Detail Viewrecord; Formvalues,submitting,submitted; inputs and Chipsvalue; Paginationpage; Tabs / Stepper / CarouselactiveIndex; Modal / Draweropen.
Configuration
- Give components clear names in the layers panel so the picker reads well (“Customers table › selectedRecord”).
- Templates:
{{component.<component id>.selectedRecord.name}}.
Outputs
- The current value of that key (a record object for
selectedRecord, a number forpage, true/false foropen…).
Example
Master–detail
Example
Table “Customers” (Row click: Select) Detail View · Record id: Customers table › selectedId Button “Edit” · Disabled when: Customers table › selectedId is empty
Errors
- Empty until the component sets the value (for example before any row is selected).
Limitations
- Only components on the same page are listed (up to 80 entries). Values reset when the page reloads.
Advanced
{ type: "component_state", componentId, key }. Keys come from each definition'sexposesState; components write withsetComponentState(store, id, patch).