View as Markdown

API reference: @salmonui/data-grid/engine

ValidatorContextinterface

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

Also exported from @salmonui/data-grid/engine/validation.

interface ValidatorContext<Row, Column = unknown> {
    readonly rowId: RowId;
    readonly columnId: string;
    readonly column: Column;
    readonly isNew: boolean;
}

Context passed to custom validators; Column is the host's column (the Data Grid passes its compiled column).

ValidatorContext members (4)
NameSignatureDescription
rowIdreadonly rowId: RowId;
columnIdreadonly columnId: string;
columnreadonly column: Column;
isNewreadonly isNew: boolean;

True for a row added in this edit session (not yet saved).