View as Markdown

API reference: @salmonui/data-grid/engine

RowDeltainterface

import type { RowDelta } from '@salmonui/data-grid/engine';
interface RowDelta {
    readonly previousCount: number;
    readonly count: number;
    readonly removed: Int32Array;
    readonly updated: Int32Array;
}

Change from one source rows array to the next within one data version chain (local patches, or a setRows that differs from the previous array in a few rows). Rows that are not listed keep their object identity and their relative order; removed rows disappear; updated rows were replaced in place; new rows are appended at the end (from index previousCount - removed.length).

RowDelta members (4)
NameSignatureDescription
previousCountreadonly previousCount: number;

Row count of the previous source array.

countreadonly count: number;

Row count of the new source array.

removedreadonly removed: Int32Array;

Previous source indexes of removed rows, ascending.

updatedreadonly updated: Int32Array;

Previous source indexes of rows replaced in place (still present), ascending.