View as Markdown

API reference: @salmonui/data-grid/engine

SerializedSelectiontype

import type { SerializedSelection } from '@salmonui/data-grid/engine';

Also exported from @salmonui/data-grid, @salmonui/data-grid/engine/selection.

type SerializedSelection = {
    readonly scope: 'explicit' | 'allFiltered';
    readonly rowIds: readonly RowId[];
    readonly excludedRowIds: readonly RowId[];
    readonly anchorRowId: RowId | null;
    readonly cellRanges: readonly CellRange[];
    readonly columnIds: readonly ColumnId[];
};

JSON form (getState/restore, persistence, server-side select-all).

SerializedSelection members (6)
NameSignatureDescription
scopereadonly scope: 'explicit' | 'allFiltered';
rowIdsreadonly rowIds: readonly RowId[];

explicit: selected ids.

excludedRowIdsreadonly excludedRowIds: readonly RowId[];

allFiltered: excluded ids.

anchorRowIdreadonly anchorRowId: RowId | null;
cellRangesreadonly cellRanges: readonly CellRange[];
columnIdsreadonly columnIds: readonly ColumnId[];