View as Markdown

API reference: @salmonui/data-grid

DataGridKeyDownContextinterface

import type { DataGridKeyDownContext } from '@salmonui/data-grid';
interface DataGridKeyDownContext {
    readonly nativeEvent: KeyboardEvent;
    readonly command: string | null;
    readonly context: DataGridKeyContext;
    readonly rowId: RowId | null;
    readonly field: string | null;
    preventDefault(): void;
}

Context of onKeyDown.

DataGridKeyDownContext members (6)
NameSignatureDescription
nativeEventreadonly nativeEvent: KeyboardEvent;
commandreadonly command: string | null;

Keyboard command bound to the key in this context (focus.down, edit.begin), or null.

contextreadonly context: DataGridKeyContext;
rowIdreadonly rowId: RowId | null;

Focused cell or header.

fieldreadonly field: string | null;
preventDefaultpreventDefault(): void;

Suppresses the built-in behavior of the binding.