Skip to content

Commit 3fa050d

Browse files
committed
fix(tables): clear row selection after context-menu delete
handleContextMenuDelete dispatched the delete but left rowSelection at its prior 'all' or 'some' state. After rows clear and a new row arrives (realtime, undo, append), rowSelectionIncludes returned true for it, rendering it checked and flipping the master checkbox back on.
1 parent d1c0eed commit 3fa050d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table/table.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,9 @@ export function Table({
541541

542542
if (snapshots.length > 0) {
543543
setDeletingRows(snapshots)
544+
if (rowSel.kind !== 'none') {
545+
setRowSelection(ROW_SELECTION_NONE)
546+
}
544547
}
545548

546549
closeContextMenu()

0 commit comments

Comments
 (0)