Skip to content

@jsvision/datagrid / EditableGridRowsConfig

Interface: EditableGridRowsConfig<T>

Defined in: datagrid/src/editable-grid-rows.ts:55

Construction config for EditableGridRows: the base grid config plus the editing wiring.

Extends

  • GridRowsConfig<T>

Type Parameters

T

T

Properties

autoScrollColumns?

optional autoScrollColumns?: boolean

Defined in: datagrid/src/editable-grid-rows.ts:151

When set, moving the cursor to an off-screen column scrolls this panel to reveal it (center panel).


autoWidths

autoWidths: () => (number | null)[]

Defined in: ui/dist/table/grid-rows.d.ts:36

The memoized auto-width measurement (a computed over the source rows).

Returns

(number | null)[]

Inherited from

GridRowsConfig.autoWidths


beforeSave?

optional beforeSave?: BeforeSave<T>

Defined in: datagrid/src/editable-grid-rows.ts:71

The optional per-cell gate above onCommit (a veto reverts and skips onCommit).


bumpVersion

bumpVersion: () => void

Defined in: datagrid/src/editable-grid-rows.ts:75

Bump-on-write so an in-place set repaints the mutated row.

Returns

void


canRevertRow?

optional canRevertRow?: () => boolean

Defined in: datagrid/src/editable-grid-rows.ts:96

Whether the exact focused row has a trapped edit session eligible for row revert.

Returns

boolean


columnOffset?

optional columnOffset?: number

Defined in: datagrid/src/editable-grid-rows.ts:129

This panel's start index in the GLOBAL column order (default 0). In a frozen-panel grid the shared focusedCol is a single global index; a panel owns [columnOffset, columnOffset + count) and maps the global cursor to its local column via this offset. 0 for a single body.


columns

columns: Column<T>[]

Defined in: ui/dist/table/grid-rows.d.ts:34

The heterogeneous columns.

Inherited from

GridRowsConfig.columns


command?

optional command?: string

Defined in: ui/dist/table/grid-rows.d.ts:48

Command name emitted on activation, handled elsewhere.

Inherited from

GridRowsConfig.command


compact?

optional compact?: boolean

Defined in: datagrid/src/editable-grid-rows.ts:171

Compact density (default false): drop the inter-column divider, reclaiming its cell so columns pack tighter. The geometry apportions over the full width with no divider cells and draw skips the ; the header/quick-filter must use the same setting so every band stays column-aligned.


dirty?

optional dirty?: DirtyRegistry

Defined in: datagrid/src/editable-grid-rows.ts:77

The shared dirty registry (pending-commit markers); omit to disable dirty tracking.


display

display: () => T[]

Defined in: ui/dist/table/grid-rows.d.ts:32

The sorted display rows (a computed in DataGrid; focused/selected index THIS list).

Returns

T[]

Inherited from

GridRowsConfig.display


emptyText?

optional emptyText?: () => string

Defined in: datagrid/src/editable-grid-rows.ts:105

The message to draw when the body has zero rows (the lifecycle empty state). Omit to keep the plain <empty> placeholder, so a grid with no lifecycle configured is byte-identical.

Returns

string


ensureRange?

optional ensureRange?: (start, end) => void | Promise<void>

Defined in: datagrid/src/editable-grid-rows.ts:187

Windowed prefetch seam: request the page range covering the visible window (plus a buffer each side) as it scrolls, coalesced to ≤1 call per frame for the settled window. Omit for an eager source — the windowed loading path is then entirely inert.

Parameters

start

number

end

number

Returns

void | Promise<void>


errors?

optional errors?: ErrorRegistry

Defined in: datagrid/src/editable-grid-rows.ts:79

The shared invalid-cell registry (the gridInvalid band + message); omit to disable surfacing.


focused

focused: Signal<number>

Defined in: ui/dist/table/grid-rows.d.ts:40

The focused (highlighted) display index (shared with the vertical scroll bar's value).

Inherited from

GridRowsConfig.focused


focusedCol

focusedCol: Signal<number>

Defined in: datagrid/src/editable-grid-rows.ts:57

The shared column cursor index, owned by the container and injected (so panels can share it).


indent

indent: Signal<number>

Defined in: ui/dist/table/grid-rows.d.ts:38

The horizontal cell offset (shared with the owned horizontal scroll bar's value).

Inherited from

GridRowsConfig.indent


keymap?

optional keymap?: GridKeymap

Defined in: datagrid/src/editable-grid-rows.ts:63

The merged chord→action keymap the body resolves keys against. The container computes it once (mergeKeymap(callerOverrides)) and passes the same frozen map to every panel, so a remap is shared across a frozen-panel split. Omit to use the default table.


markRowTouched?

optional markRowTouched?: (rowKey) => void

Defined in: datagrid/src/editable-grid-rows.ts:88

Touched-only compatibility notification for direct body consumers.

New integrations should use EditableGridRowsConfig.onAcceptedCommit; this callback cannot retain the values and setter required for complete row recovery.

Parameters

rowKey

string | number

Returns

void


mouseColumns?

optional mouseColumns?: boolean

Defined in: datagrid/src/editable-grid-rows.ts:149

When set, a mouse-down sets the global column cursor to the clicked column (frozen-panel mode).


onAcceptedCommit?

optional onAcceptedCommit?: (change) => void

Defined in: datagrid/src/editable-grid-rows.ts:81

Report a complete accepted commit to the container's row-session journal.

Parameters

change

AcceptedCellCommit<T>

Returns

void


onCommit?

optional onCommit?: OnCommit<T>

Defined in: datagrid/src/editable-grid-rows.ts:69

The optional per-cell veto sink.


onCursorEnterPanel?

optional onCursorEnterPanel?: (globalCol, ev) => void

Defined in: datagrid/src/editable-grid-rows.ts:140

Called when a cursor move lands focusedCol outside this panel's range, so the container can re-focus the panel that now owns the cursor (a leaf-focus hop). Omitted for a single body.

Parameters

globalCol

number

ev

DispatchEvent

Returns

void


onOpenFilter?

optional onOpenFilter?: (globalCol, ev) => void

Defined in: datagrid/src/editable-grid-rows.ts:147

Open-filter sink: fired when Alt+Down is pressed on the non-editing body, with the GLOBAL focused column index and the live dispatch envelope (so the popup inherits ev.focusView/ev.popupHost). The container resolves the column's filterability and owning header and opens the condition popup. Optional — a body without it ignores Alt+Down (which then falls through to the base row cursor).

Parameters

globalCol

number

ev

DispatchEvent

Returns

void


onRangeToRow?

optional onRangeToRow?: (rowIndex) => void

Defined in: datagrid/src/editable-grid-rows.ts:123

Extend the selection range to the row at a display index — wired to Shift+click and Shift+↑/↓. The container captures the pre-move cursor row as the range's default anchor, moves the cursor to the target, and unions the display-order run. Omitted for a body without selection.

Parameters

rowIndex

number

Returns

void


onRevertRow?

optional onRevertRow?: () => void

Defined in: datagrid/src/editable-grid-rows.ts:100

Start the eligible focused row's revert transaction.

Returns

void


onSelect?

optional onSelect?: (index, row) => void

Defined in: ui/dist/table/grid-rows.d.ts:46

Activation callback (Enter/Space or double-click); index is display order, row the value.

Parameters

index

number

row

T

Returns

void

Inherited from

GridRowsConfig.onSelect


onToggleRow?

optional onToggleRow?: (rowIndex) => void

Defined in: datagrid/src/editable-grid-rows.ts:117

Toggle the selection of the row at a display index — wired to Space on a read-only focused cell and Ctrl+click. The container maps the index to a key, moves the cursor to it, and toggles it. Omitted for a body without selection (the gesture then falls through to the base).

Parameters

rowIndex

number

Returns

void


overlay

overlay: Group

Defined in: datagrid/src/editable-grid-rows.ts:67

The editor mount host (the container's absolute overlay group).


panelActive?

optional panelActive?: () => boolean

Defined in: datagrid/src/editable-grid-rows.ts:158

Grid-wide focus predicate (frozen-panel mode). When set, the focused-row highlight, the cursor cell, and the dirty markers light up whenever any sibling panel holds focus — not only this one — so the shared row cursor reads as one continuous row across the frozen boundary. Omit for a single body (focus is then this view's own).

Returns

boolean


prefetch?

optional prefetch?: number

Defined in: datagrid/src/editable-grid-rows.ts:195

Prefetch buffer size in rows on each side of the viewport. Unset ⇒ one viewport (the current visible row count, resolved per-draw, since the viewport height is not known at config time); a number pins a fixed buffer.


rowCeil?

optional rowCeil?: number

Defined in: datagrid/src/editable-grid-rows.ts:181


rowCount?

optional rowCount?: () => number

Defined in: datagrid/src/editable-grid-rows.ts:189

The source's total row count (windowed) — the window clamp reads it. Omit for an eager source.

Returns

number


rowFloor?

optional rowFloor?: number

Defined in: datagrid/src/editable-grid-rows.ts:180

Clamp the top of this panel's virtual window to [rowFloor, rowCeil] (default [0, ∞)). Used to split the row axis for frozen rows: a pinned band sets rowFloor: 0, rowCeil: 0 (its window never scrolls off row 0), while the scrolling body sets rowFloor: N (its window starts after the N pinned rows, so a pinned row is never rendered twice). The shared focused cursor still ranges over the whole row set; the panel that does not own the cursor simply doesn't render it (its window excludes that row), and the sibling that does render it lights it up.


rowKey

rowKey: (row) => string | number

Defined in: datagrid/src/editable-grid-rows.ts:73

The row-identity function (from the data source).

Parameters

row

T

Returns

string | number


rowLeaveGate?

optional rowLeaveGate?: () => boolean

Defined in: datagrid/src/editable-grid-rows.ts:94

The row-leave gate: consulted before a row-changing move (keyboard row-nav, the Enter-advance, or a click on a different row). Returns true to allow the leave, false to block it (the gate has already refocused the offending field). A within-row column move never consults it. Omit for no gate.

Returns

boolean


rowRevertPending?

optional rowRevertPending?: () => boolean

Defined in: datagrid/src/editable-grid-rows.ts:98

Whether an optimistic row revert currently owns grid input and presentation.

Returns

boolean


selected

selected: Signal<number>

Defined in: ui/dist/table/grid-rows.d.ts:42

The selected (chosen) display index (-1 = none).

Inherited from

GridRowsConfig.selected


selectedKeys?

optional selectedKeys?: Signal<ReadonlySet<Key>>

Defined in: datagrid/src/editable-grid-rows.ts:111

The datagrid selection set, keyed by rowKey — the body paints a row's selected role by membership here (not the base's single selected index, which is kept only as the base's required click sink). Optional: omit for a body that shows no selection (defaults to an empty set).


totalCols?

optional totalCols?: () => number

Defined in: datagrid/src/editable-grid-rows.ts:135

The GLOBAL visible column count (default: this panel's own column count). The cursor keys move focusedCol over [0, totalCols()); a single body's totalCols is just its column count, so its navigation is unchanged.

Returns

number


typedColumns

typedColumns: GridColumn<T, unknown>[]

Defined in: datagrid/src/editable-grid-rows.ts:65

The typed columns (parse/set/format live here; the base columns are the engine adapters).


widthTick?

optional widthTick?: () => unknown

Defined in: datagrid/src/editable-grid-rows.ts:165

A reactive column-geometry trigger. Bound for repaint so a change to a column's width override (a live resize / auto-fit) re-apportions and repaints — draw reads widths through the column objects but does not auto-track, so this explicit read is what schedules the repaint. Omit when the grid has no resizable columns.

Returns

unknown


zebra

zebra: boolean

Defined in: ui/dist/table/grid-rows.d.ts:44

Stripe odd rows for readability (below focus/selection in priority).

Inherited from

GridRowsConfig.zebra