Cell-Level Pessimistic Commit with Server Confirmation
Lets the application decide, for each cell edit, whether the value is accepted, holding the edit in a pending state until a server or business rule confirms it. The editor stays visible but locked, the post-commit navigation waits, and the application then confirms, rejects silently, or fails with a message attached to the cell. It complements the row-level saveHandler in F28 for data-entry screens that save each ce…
Planned. This page shows the specification from issue #194. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A 50-row price list connected to a mock API with configurable latency and outcomes.
Expected behavior
In pessimistic mode, Enter shows a spinner in the cell, disables the editor and keeps focus there. An accepted commit writes the value and then moves to the next row. A rejection with a message shows an error marker and tooltip and reopens the editor with the user's value. A silent rejection restores the original value. Escape during a pending commit aborts the request through the AbortSignal.
Planned API surface
onCellCommit(ctx) → void | Promise<void>ctx.preventDefault()ctx.markPending()ctx.confirm(value?)ctx.fail(message)ctx.signalcommitPolicy: 'optimistic' | 'pessimistic'cellCommitState: 'idle' | 'pending' | 'failed'pendingNavigation: 'block' | 'allow'Acceptance criteria
- A handler that returns nothing, or calls confirm() synchronously, commits immediately, so synchronous handlers need no changes. (pending)
- markPending() locks only that cell; other cells stay editable unless pendingNavigation is 'block'. (pending)
- fail(message) sets the cell's error state (F17) and does not write the value to the row. (pending)
- Post-commit navigation (Enter moves down, Tab moves right) runs only after confirmation. (pending)
- confirm(value) writes the server-normalised value when it differs from what the user typed. (pending)
- Aborting, unmounting or replacing the row cancels the pending commit through ctx.signal and leaves no locked cell. (pending)
- A commit for a cell that scrolls out of the virtualized viewport still completes, and the cell shows the result when it scrolls back. (pending)