Fix issue with shift + click row range selection in the query tool data output window#8554
Conversation
- set isShiftClick property to useRowSelection react hook update function
web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/index.jsx
Outdated
Show resolved
Hide resolved
adityatoshniwal
left a comment
There was a problem hiding this comment.
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
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 |
|
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
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. |
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
isShiftClickproperty touseRowSelectionreact hook update functionrangeSelectionModeproperty to data grid components to propagate shift click behaviour to theselectedRowsreact hook underResultSet.jsx