@kanunilabs/datagrid-react-enterprise
@kanunilabs/datagrid-react-enterprise / GridEditFormProps
Interface: GridEditFormProps<TRow>
Type Parameters
TRow
TRow = GridRowData
Properties
dark?
optionaldark?:boolean
errors
errors:
Record<string,string>
Validation message per column id; only invalid columns appear.
fields
fields: readonly
EditFormField<TRow>[]
getValue
getValue: (
columnId) =>unknown
Current (pending) value per column.
Parameters
columnId
string
Returns
unknown
inline?
optionalinline?:boolean
Drawn INSIDE the grid, in the row flow (mode: 'form', gap D5a).
Only changes the chrome: a panel that already sits in a row slot needs no outer margin, drop shadow or rounded corners — those exist to lift a floating panel off the page, and here they would draw a second card inside the one the row already is.
isNew
isNew:
boolean
labels?
optionallabels?:Partial<EditFormLabels>
lookups
lookups:
RowLookupMap
onCancel
onCancel: () =>
void
Returns
void
onChange
onChange: (
columnId,value) =>void
Parameters
columnId
string
value
unknown
Returns
void
onNaturalHeight?
optionalonNaturalHeight?: (px) =>void
Reports the height the form WANTS, in px, once it is in the DOM.
The in-grid form is given a slot measured in whole rows, so somebody has
to decide how many. Measured here because this is where the DOM is, and
measured through the scrolling field area — scrollHeight is the content,
clientHeight the space it was given — so the answer does not depend on
the slot already assigned. Reading the panel's own height instead would
feed the current slot straight back in and never converge.
Parameters
px
number
Returns
void
onSave
onSave: () =>
void
Returns
void
popup?
optionalpopup?:boolean
Rendered as a modal dialog rather than inline.
row
row:
TRow|undefined
The row with pending edits applied — what a custom editor should read.
rowKey
rowKey:
RowKey
saveError?
optionalsaveError?:string|null
Shown above the fields when the last save was rejected.
saving
saving:
boolean
True while the save is in flight; the form goes read-only.