API reference: @salmonui/data-grid
DataGridRowClickEventinterface
import type { DataGridRowClickEvent } from '@salmonui/data-grid';interface DataGridRowClickEvent<Row> extends DataGridEvent {
readonly rowId: RowId;
readonly row: Row;
readonly rowIndex: number;
readonly field: string | null;
readonly column: DataGridColumnInfo<Row> | null;
readonly element: HTMLElement;
readonly nativeEvent: MouseEvent;
}
onRowClick / onRowDoubleClick. preventDefault() cancels the built-in action.
| Name | Signature | Description |
|---|---|---|
rowId | readonly rowId: RowId; | |
row | readonly row: Row; | |
rowIndex | readonly rowIndex: number; | Visible index of the row. |
field | readonly field: string | null; | Column key of the clicked cell, or null outside a cell. |
column | readonly column: DataGridColumnInfo<Row> | null; | |
element | readonly element: HTMLElement; | The row 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). |