type
RowLabelProps
The current row values and position passed to a custom array or block heading.
Component props
| Property | Type | Description |
|---|---|---|
field | SchemaField | The containing array or block field’s schema, including its name, path, and display settings. |
row | RowLabelSnapshot | A read-only copy of the current row’s values, including unsaved edits. Ridu supplies a new snapshot when the row changes. |
rowNumber | number | The displayed row position, starting at one. Updates when the row moves. |
i18n | AdminI18n | Translate labels and format values using the admin’s language and preferences. |
config | Config | Present only when defineRowLabel supplies decodeConfig. Contains the checked settings returned by the decoder. |
How it works
row contains unsaved values and is read-only. rowNumber starts at one and changes when the row is moved.
Read these props with $props() and derive the heading with Svelte $derived so it updates while the user edits the row.
config is available only when defineRowLabel has a decodeConfig function. Use a field component for editing controls.
Full signature
type RowLabelProps<Config = undefined> = Omit<RowLabelComponentProps, "config"> &
([Config] extends [undefined] ? { config?: never } : { config: Config })