-
Notifications
You must be signed in to change notification settings - Fork 3.5k
improvement(tables): tables multi-select, keyboard shortcuts, and docs #3615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
11fce3b
added docs for tables
waleedlatif1 3e4241c
fix: remove generated files and move image to correct path
waleedlatif1 f326b05
fix(tables): skip gap positions in handleCopy for checked rows
waleedlatif1 e25770b
fix(tables): remove dead props from DataRow and PositionGapRows
waleedlatif1 116648b
fix(tables): clear range selection on Shift+Space to prevent mixed state
waleedlatif1 4ea4490
fix(tables): remove dead handleRowMouseDown and handleRowMouseEnter
waleedlatif1 29c765c
fix(tables): move Escape and Cmd+A above anchor guard
waleedlatif1 3e51e1c
fix(tables): Shift+Space preserves anchor for continued keyboard use
waleedlatif1 ad34616
fix(tables): only add real row positions in shift-click range select
waleedlatif1 57d7f76
fix(tables): Delete/Backspace works after Cmd+A select all
waleedlatif1 4c16333
docs(tables): clarify Delete/Backspace clears all columns in checkbox…
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(tables): Shift+Space preserves anchor for continued keyboard use
Previously Shift+Space cleared selectionAnchor, making all subsequent keyboard shortcuts (arrows, enter, tab) inoperable until a cell was clicked. Now it preserves the anchor and only clears focus, so users can arrow-navigate and Shift+Space to toggle multiple rows in sequence. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Loading branch information
commit 3e51e1c9aa90353002001d05e4f899a08cc99716
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shift+Spacecan add gap-row positions tocheckedRowsa.rowIndexis the row coordinate fromselectionAnchor, which is valid for any grid position — including gap positions that have no corresponding entry inpositionMap. When the user navigates to a gap row and pressesShift+Space, that position is unconditionally added tocheckedRows:The downstream operations (copy, cut, delete) all gate on
pMap.get(pos)and skip gaps, so no data corruption occurs. However, the gap row's checkbox will render as visually checked (becausecheckedRows.has(position)is true inPositionGapRows), and the gap position inflatescheckedRows.size. This meansisAllRowsSelectedcan under-count (checkedRows.size >= rows.lengthmight be true while some real rows aren't checked because the set is padded with phantom positions).Consider guarding with a
positionMaplookup: