Async Save and Server Reconciliation
Handles saves that go to a server for any edit mode. It covers optimistic updates, per-row pending states, rollback when the save fails, conflict detection and swapping temporary IDs for server IDs. This links client-side editing to a backend reliably.
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
An orders grid connected to a mock API with options for latency, errors and conflicts.
Expected behavior
Pending rows show a spinner and cannot be edited, or can be edited with queued changes, depending on the configuration. Failed rows roll back or keep the user's values with an error message. Conflicts offer 'Keep mine' or 'Reload'. Temporary IDs are swapped for server IDs without losing focus.
Planned API surface
saveHandler(changes, signal)optimisticUpdatesrowSaveState: 'pending'|'saved'|'error'|'conflict'resolveConflict(rowId, strategy)replaceRowId(tempId, serverId)retrySave()onSaveErrorAcceptance criteria
- Optimistic updates appear immediately and roll back exactly when the save fails. (pending)
- Field errors returned by the server are attached to the matching cells. (pending)
- Swapping IDs keeps the selection, focus and dirty state. (pending)
- Retrying resends only the changes that failed. (pending)