API reference: @salmonui/data-grid
DataGridCellClickEventinterface
import type { DataGridCellClickEvent } from '@salmonui/data-grid';interface DataGridCellClickEvent<Row> extends DataGridEvent {
readonly rowId: RowId;
readonly row: Row;
readonly rowIndex: number;
readonly field: string;
readonly column: DataGridColumnInfo<Row> | null;
readonly value: unknown;
readonly element: HTMLElement;
readonly nativeEvent: MouseEvent;
}
onCellClick / onCellDoubleClick. preventDefault() cancels the built-in action.
| Name | Signature | Description |
|---|---|---|
rowId | readonly rowId: RowId; | |
row | readonly row: Row; | |
rowIndex | readonly rowIndex: number; | |
field | readonly field: string; | |
column | readonly column: DataGridColumnInfo<Row> | null; | |
value | readonly value: unknown; | The cell value ( |
element | readonly element: HTMLElement; | The cell element. |
nativeEvent | readonly nativeEvent: MouseEvent; | |
typeinherited | type: string; |
|
sourceinherited | source: DataGridEventSource; | |
defaultPreventedinherited | defaultPrevented: boolean; | True after |
preventDefaultinherited | preventDefault: () => void; | Before-events and click events: cancels the action (or the built-in behavior). |