API reference: @salmonui/data-grid/engine
EditStateinterface
import type { EditState } from '@salmonui/data-grid/engine';Also exported from @salmonui/data-grid/engine/edit.
interface EditState {
readonly options: ResolvedEditOptions;
readonly version: number;
readonly newRowId: RowId | null;
readonly active: EditTarget | null;
readonly status: EditStatus;
readonly dirtyCellCount: number;
readonly addedRowIds: readonly RowId[];
readonly deletedRowIds: readonly RowId[];
readonly pendingWrites: number;
readonly lastError: string | null;
readonly lastBulk: {
readonly requested: number;
readonly applied: number;
} | null;
readonly canUndo: boolean;
readonly addedTreePlacements?: Readonly<Record<RowId, AddedTreePlacement>>;
readonly canRedo: boolean;
readonly change: EditChange;
}
| Name | Signature | Description |
|---|---|---|
options | readonly options: ResolvedEditOptions; | |
version | readonly version: number; | |
newRowId | readonly newRowId: RowId | null; | The always-visible add row ( |
active | readonly active: EditTarget | null; | |
status | readonly status: EditStatus; | |
dirtyCellCount | readonly dirtyCellCount: number; | |
addedRowIds | readonly addedRowIds: readonly RowId[]; | Added, unsaved rows in display order (identity changes only when the list changes). |
deletedRowIds | readonly deletedRowIds: readonly RowId[]; | Rows marked for deletion in batch mode. |
pendingWrites | readonly pendingWrites: number; | |
lastError | readonly lastError: string | null; | Message of the last failed write, cleared by the next successful one. |
lastBulk | readonly lastBulk: {
readonly requested: number;
readonly applied: number;
} | null; | Outcome of the last |
canUndo | readonly canUndo: boolean; | An |
addedTreePlacementsoptional | readonly addedTreePlacements?: Readonly<Record<RowId, AddedTreePlacement>>; | Tree mode: where each added row goes ( |
canRedo | readonly canRedo: boolean; | An |
change | readonly change: EditChange; |