Row patches
Upserted rows replace the loaded row with the same key. New rows are added. Without a group, the merged rows are placed in the order of the current sort.
From an array
createArraySource returns a source with patch(patch). It updates the source’s rows and broadcasts the patch to every subscribed grid.
patch.ts
From your own transport
A source is live when it hassubscribe(onPatch). The grid subscribes on its first load and calls the returned function when it is disposed. Set live: true in the capabilities so servers and tools know it.
with-socket.ts
rowPatchSchema from tally-protocol validates a patch that crossed the network.
Which sources are live
Over HTTP
tally-server writes each patch as an event: patch message on GET /events and sends a keep-alive comment every heartbeatMs, 15 seconds by default. connectHttpSource opens the stream with the same headers as every request and closes it when the grid is disposed.
Patch events that do not match the protocol schema are dropped on the client.
Changed cells
The row store records which columns a patch changed for each row.useRows(grid).changed maps a row key to those column ids, and in filters the grid runs itself, the is:changed flag matches those rows.
changed-count.tsx