View as Markdown

API reference: @salmonui/data-grid

DataGridEditStartEventinterface

import type { DataGridEditStartEvent } from '@salmonui/data-grid';
interface DataGridEditStartEvent<Row> extends DataGridEvent {
    readonly rowId: RowId;
    readonly row: Row | undefined;
    readonly field: string | null;
    readonly mode: EditMode;
    readonly isNew: boolean;
}

onBeforeEditStart / onEditStart.

DataGridEditStartEvent members (9, 4 inherited)
NameSignatureDescription
rowIdreadonly rowId: RowId;
rowreadonly row: Row | undefined;

The row (the draft base for added rows).

fieldreadonly field: string | null;

The cell in batch and cell mode (and the focused editor in row mode); null otherwise.

modereadonly mode: EditMode;
isNewreadonly isNew: boolean;
typeinheritedtype: string;

'sortChange', 'beforeSortChange', ...

sourceinheritedsource: DataGridEventSource;
defaultPreventedinheriteddefaultPrevented: boolean;

True after preventDefault() (before-events and click events).

preventDefaultinheritedpreventDefault: () => void;

Before-events and click events: cancels the action (or the built-in behavior).