Skip to content

EditorSlotProps

Slot context for #editor slot in TbwGridColumn.

<TbwGridColumn field="name" editable>
<template #editor="{ value, commit, cancel }">
<input
:value="value"
@blur="commit($event.target.value)"
@keydown.escape="cancel()"
/>
</template>
</TbwGridColumn>
PropertyTypeDescription
valueTValueThe current cell value
rowTRowThe entire row data
columnColumnConfig<TRow>The column configuration
fieldstringField name being edited
rowIdstringStable row identifier (from getRowId). Empty string if no getRowId is configured.
commit(newValue: TValue) => voidCommit the edit with new value
cancel() => voidCancel the edit
updateRow(changes: Partial<TRow>) => voidUpdate other fields in this row while the editor is open. Changes trigger cell-change events with source 'cascade'.
onValueChange?(callback: (newValue: TValue) => void) => voidRegister a callback to receive value updates when the cell is modified externally (e.g., via updateRow() from another cell’s commit).
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt