Skip to content

Extend the selected cell range on shift + click. - #9

Merged
dpage merged 1 commit into
mainfrom
fix/shift-click-range-selection
Oct 15, 2026
Merged

dpage merged 1 commit into
mainfrom
fix/shift-click-range-selection

Conversation

@dpage

@dpage dpage commented Oct 15, 2026 •

Copy link
Copy Markdown

For pgadmin-org/pgadmin4#8647 ("Cell range selection on shift + click should work").

What changed

  • With enableRangeSelection, shift + mousedown on a cell now extends the selected range from the currently selected cell (the anchor) to the clicked cell, in the same way as shift + arrow keys, rather than moving the selection. Repeated shift + clicks keep the same anchor. With range selection disabled, shift + click behaves as a normal click.
  • A plain click on the selected cell itself now collapses an extended range back to that cell; previously only clicking a different cell reset it.
  • Shift + click whilst a cell editor is open commits the edit and closes the editor before extending the range.
  • SelectCellOptions gains an optional extendRange flag.
  • lib/ is rebuilt, since pgAdmin installs this fork straight from git.

Test plan

  • test/browser/rangeSelection.test.tsx gains tests for shift + click extending the range downwards/rightwards and upwards/leftwards, repeated shift + click keeping the anchor, plain click resetting the range (including on the anchor cell), and shift + click behaving as a normal click when range selection is disabled. They pass in Chromium and Firefox, and four of the five fail without the change.
  • Every CI step passes (Biome, typecheck, ESLint, Prettier, bundle, website build, browser tests), apart from the Firefox failure in resizable.test.tsx ("should remeasure flex columns"), which also fails on main.

Shift + mousedown on a cell now extends the selected range from the currently
selected cell, as shift + arrow keys do, instead of moving the selection.
Clicking the selected cell without shift collapses an extended range back to
that cell, and shift + click whilst editing commits and closes the editor.

Refs pgadmin-org/pgadmin4#8647
@dpage
dpage force-pushed the fix/shift-click-range-selection branch from ee4c6cf to eea23f8 Compare October 15, 2026 12:08
@dpage
dpage merged commit d9dccda into main Oct 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant