Documentation

@kanunilabs/datagrid-enterprise


@kanunilabs/datagrid-enterprise / EditFormSpec

Interface: EditFormSpec

Properties

fields

fields: readonly EditFormField[]


getErrors

getErrors: () => Record<string, string>

Validation message per column id; only invalid columns appear.

Returns

Record<string, string>


getSaveError

getSaveError: () => string | null

Returns

string | null


getSaving

getSaving: () => boolean

Returns

boolean


getValue

getValue: (columnId) => unknown

Current (pending) value per column.

Parameters

columnId

string

Returns

unknown


inline?

optional inline?: boolean

Drawn INSIDE the grid, in the row flow (mode: 'form') — drops the floating chrome so the panel does not draw a card inside the row.


isNew

isNew: boolean


onCancel

onCancel: () => void

Returns

void


onChange

onChange: (columnId, value) => void

Parameters

columnId

string

value

unknown

Returns

void


onNaturalHeight?

optional onNaturalHeight?: (px) => void

Reports the height the form WANTS, in px, once it is in the DOM.

Parameters

px

number

Returns

void


onSave

onSave: () => void

Returns

void


optional popup?: boolean

Rendered as a modal dialog rather than inline in a row.


rowKey

rowKey: RowKey


surfaceClass?

optional surfaceClass?: string

The portal surface classes (popup mode + nested editors).


t

t: GridDictionary