feat: add select multiple rows with shift - #224
Conversation
|
This PR was not deployed automatically as @geekyharsh05 does not have access to the Railway project. In order to get automatic PR deploys, please add @geekyharsh05 to your workspace on Railway. |
There was a problem hiding this comment.
Pull request overview
This PR adds shift-click and keyboard navigation functionality to enable multi-row selection in database tables. Users can now select ranges of rows using Shift+Click or Shift+Arrow keys, improving the table interaction experience.
Key Changes:
- Introduced
SelectionStateandLastClickedIndexcontexts to track selection state across components - Implemented shift-click handler in checkboxes to select row ranges
- Added keyboard navigation (Shift+ArrowUp/Down) for expanding/shrinking selection ranges
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
apps/desktop/src/routes/(protected)/_protected/database/$id/table/-store.ts |
Adds new context definitions and types for tracking selection state and last clicked index |
apps/desktop/src/routes/(protected)/_protected/database/$id/table/index.tsx |
Initializes refs and provides selection contexts to child components |
apps/desktop/src/routes/(protected)/_protected/database/$id/table/-components/table.tsx |
Implements keyboard event handler for Shift+Arrow navigation and makes table focusable |
apps/desktop/src/routes/(protected)/_protected/database/$id/table/-components/table-selection.tsx |
Updates checkbox click handler to support shift-click range selection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rudra-Sankha-Sinhamahapatra
left a comment
There was a problem hiding this comment.
Looks good
…t/shift-row-selection
…t/shift-row-selection
…t/shift-row-selection
Rudra-Sankha-Sinhamahapatra
left a comment
There was a problem hiding this comment.
Looks Good
…t/shift-row-selection
…t/shift-row-selection
Closes #130