fix(tables): row gutter click toggles select; select-all works under sort/filter#4446
fix(tables): row gutter click toggles select; select-all works under sort/filter#4446waleedlatif1 wants to merge 1 commit intostagingfrom
Conversation
…sort/filter - Move row-toggle onMouseDown from inner checkbox div to entire gutter <td> so clicking anywhere in the gutter cell toggles the row, matching boolean cell behavior. Stop propagation on the per-row run button so it doesn't double as a row toggle. - Compute maxPosition via Math.max over loaded rows instead of rows[last].position. Under sort, the last visual row's position is not the largest position, so select-all/Ctrl+A produced a range that missed rows whose position fell outside [0, lastVisualRow.position]. - Add minPosition for the same reason and use it as the select-all anchor — under filter, position 0 may not be loaded, so anchoring at 0 produced a range that visually appeared empty. - Re-derive isAllRowsSelected from "every loaded row's position is within selection range" rather than checking exact start/end equality against maxPosition, so the top-left checkbox highlight is correct under any sort/filter state. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Clicking anywhere in the row-number gutter cell (including gap rows) now toggles row selection, while the per-row run/stop button stops propagation so it doesn’t toggle selection. Reviewed by Cursor Bugbot for commit 9a4e61a. Configure here. |
Greptile SummaryThis PR fixes three related bugs in the table component: Confidence Score: 4/5Safe to merge; the core fixes are correct and the only remaining issue is a minor inconsistency in two non-primary code paths. All three advertised bugs are correctly fixed. The single P2 finding (residual rowIndex: 0 in Ctrl+Space and handleGroupSelect) is a pre-existing inconsistency that the PR does not claim to address and has no data-loss risk. No files require special attention beyond the noted Ctrl+Space / handleGroupSelect anchor inconsistency in table.tsx. Important Files Changed
|
Summary
Test plan