-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DataGrid] Don't close column menu when updating rows #4498
Conversation
These are the results for the performance tests:
|
I'm not sure this solution fix the following scenario when we will try to implement column menu filtering #3571 (comment)
If there are fewer rows passing the filter than where you currently are, the grid will scroll up and the close the column menu |
@alexfauquette I was considering this an edge case. We could check how much was scrolled since the last event. Anyway, I changed to listen to the |
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.
Looks good. Notice that onWheel
will not be triggered when using the scroll bar
wheelScroll.mp4
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.
onWheel
is not called when scrolling on a tactile device.
@flaviendelangle Which tactile device do you refer to? Scrolling in a touchpad is like using the mouse wheel, so it emits |
I am not talking about a Touchpad, but directly scrolling by swiping on a touch screen. |
@alexfauquette This is caused by
@flaviendelangle I added a listener to |
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.
I now work on my phone 👍
Fixes #4139
Preview: https://deploy-preview-4498--material-ui-x.netlify.app/x/react-data-grid/
CodeSandbox: https://codesandbox.io/s/fullfeatureddemo-material-demo-forked-98j7cp?file=/demo.tsx
I implemented the solution from #4139 (comment). I chose this one because it also unlocks the possibility to have filters inside the column menu. Previously, we couldn't because the column menu closes when filtering: #3571 (comment)