API reference: @salmonui/data-grid
DataGridAddEventinterface
import type { DataGridAddEvent } from '@salmonui/data-grid';interface DataGridAddEvent<Row> extends DataGridEvent {
readonly row: Readonly<Record<string, unknown>> | undefined;
readonly position: 'top' | 'bottom';
readonly rowId: RowId | null;
readonly isNew: true;
readonly _row?: Row;
}
onBeforeAdd / onAdd.
| Name | Signature | Description |
|---|---|---|
row | readonly row: Readonly<Record<string, unknown>> | undefined; | Initial values passed to |
position | readonly position: 'top' | 'bottom'; | |
rowId | readonly rowId: RowId | null; | Temporary id of the added row (after-event only). |
isNew | readonly isNew: true; | |
_rowoptional | readonly _row?: Row; | Type witness. |
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). |