@helix-x/datagrid-ui - v0.1.2
    Preparing search index...

    Interface EditorParams<T, C>

    What a cell editor receives — both the built-ins and your own.

    interface EditorParams<T, C = unknown> {
        autoFocus?: boolean;
        column: ColumnDef<T, C>;
        context: C;
        error?: string;
        onCancel: () => void;
        onChange: (value: unknown) => void;
        onCommit: () => void;
        row: T;
        value: unknown;
    }

    Type Parameters

    • T

      The row type.

    • C = unknown

      The context type.

    Index
    autoFocus?: boolean

    True for the first editable cell in the row.

    column: ColumnDef<T, C>

    The column being edited.

    context: C

    The grid's context.

    error?: string

    Server-supplied message for this field, if the last commit was rejected.

    onCancel: () => void

    Abandon the edit and restore the original row.

    onChange: (value: unknown) => void

    Writes into the row draft. Never hits the network.

    onCommit: () => void

    Commit the whole row, invoking DataGridProps.onRowCommit.

    row: T

    The row being edited, as a draft copy.

    value: unknown

    Current draft value for this cell.