Skip to content

Fix issue with shift + click row range selection in the query tool data output window#8554

Merged
adityatoshniwal merged 3 commits intopgadmin-org:masterfrom
KijongHan:GH_5266
Apr 8, 2025
Merged

Fix issue with shift + click row range selection in the query tool data output window#8554
adityatoshniwal merged 3 commits intopgadmin-org:masterfrom
KijongHan:GH_5266

Conversation

@KijongHan
Copy link
Copy Markdown
Contributor

Resolves issue #5266

What does this PR do?

This PR resolves an apparent regression where selecting a range of rows in the query tool data output window using shift+click was no longer functional in the new pgAdmin (range selection had been recently introduced to the react-data-grid repository and the following migration of that functionality to the pgAdmin fork

Summary of changes

  • set isShiftClick property to useRowSelection react hook update function
  • set rangeSelectionMode property to data grid components to propagate shift click behaviour to the selectedRows react hook under ResultSet.jsx

- set isShiftClick property to useRowSelection react hook update function
Copy link
Copy Markdown
Contributor

@adityatoshniwal adityatoshniwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it fixes shift row selection, it doesn't work for columns and cell range selection.
I think it is a partial fix.

- reinstate default behaviour for range selection for components
@KijongHan
Copy link
Copy Markdown
Contributor Author

While it fixes shift row selection, it doesn't work for columns and cell range selection. I think it is a partial fix.

yeah I see what you mean, I assumed that most use cases would involve shift+click while scrolling down the result grid (as opposed to for large column tables) and the issue described seemed to target this sort of use case - but let me know if you want those issues worked on in this PR or raised as separate issues

@adityatoshniwal
Copy link
Copy Markdown
Contributor

Hi @KijongHan,

It would be great to fix in the same PR if you can. That way we can close #5266. Otherwise, it will remain open until other things are fixed.

…m context as opposed to having the whole collection context

- pass isShiftClick to onColumnSelected from SelectableHeaderRenderer and handle shift selection logic for columns
 pgadmin-org#5266
@KijongHan
Copy link
Copy Markdown
Contributor Author

Hi @KijongHan,

It would be great to fix in the same PR if you can. That way we can close #5266. Otherwise, it will remain open until other things are fixed.

Cool, Ill see what can be done @adityatoshniwal . I just updated the PR to introduce similar behaviour for shift+clicking through column selection if you could please review those changes

@adityatoshniwal
Copy link
Copy Markdown
Contributor

Cool, Ill see what can be done @adityatoshniwal . I just updated the PR to introduce similar behaviour for shift+clicking through column selection if you could please review those changes

@KijongHan Nice! So rows and columns are done. Cell range remains. Do you want to fix it?

@KijongHan
Copy link
Copy Markdown
Contributor Author

Cool, Ill see what can be done @adityatoshniwal . I just updated the PR to introduce similar behaviour for shift+clicking through column selection if you could please review those changes

@KijongHan Nice! So rows and columns are done. Cell range remains. Do you want to fix it?

Hey @adityatoshniwal - sorry didnt have too much time over the last few weeks to look into it and Im currently on holiday at the moment, if its okay with you we can merge these in minus the cell range fix?

@adityatoshniwal
Copy link
Copy Markdown
Contributor

Cool, Ill see what can be done @adityatoshniwal . I just updated the PR to introduce similar behaviour for shift+clicking through column selection if you could please review those changes

@KijongHan Nice! So rows and columns are done. Cell range remains. Do you want to fix it?

Hey @adityatoshniwal - sorry didnt have too much time over the last few weeks to look into it and Im currently on holiday at the moment, if its okay with you we can merge these in minus the cell range fix?

OK. No problem.

@adityatoshniwal adityatoshniwal merged commit 51897dc into pgadmin-org:master Apr 8, 2025
32 checks 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.

2 participants