Table Switch
Switch sized for use inside TableData rows. Tracks state in a shared useState keyed by itemId + statusKey so multiple instances on the same page stay in sync.
Default
Drop into a row cell. itemId is required so each row has its own state.
API Reference
Props, events, and slots for each sub-component.
TableSwitch
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| modelValue | boolean | — | Checked state. Supports v-model. |
| itemId | string | number | — | Required. Stable id of the row. Used as part of the shared-state key. |
| statusKey | string | "default" | Namespace for the shared state. Use one per status column when you have multiple toggles per row. |
| disabled | boolean | false | Disable input. |
Events
| Event | Description |
|---|---|
| update:modelValue | Fires with the new checked state. Enables v-model. |