View as Markdown

API reference: @salmonui/data-grid

DataGridEditColumninterface

import type { DataGridEditColumn } from '@salmonui/data-grid';
interface DataGridEditColumn<Row> {
    readonly editor?: DataGridEditorType | (string & {});
    readonly editorProps?: DataGridEditorProps;
    readonly renderEditor?: (ctx: DataGridEditorContext<Row>) => ReactNode;
    readonly commands?: readonly DataGridCommandItem<Row>[];
}

Editing fields of DataGridColumn.

DataGridEditColumn members (4)
NameSignatureDescription
editoroptionalreadonly editor?: DataGridEditorType | (string & {});

Built-in editor. Default: from type (number, boolean -> checkbox, date, datetime, lookups -> select, else text).

editorPropsoptionalreadonly editorProps?: DataGridEditorProps;

Props of the built-in editor.

renderEditoroptionalreadonly renderEditor?: (ctx: DataGridEditorContext<Row>) => ReactNode;

Custom editor.

commandsoptionalreadonly commands?: readonly DataGridCommandItem<Row>[];

Command column buttons. A column with commands is never edited itself.