-
-
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] Fix iOS issue when scrolling left #439
[DataGrid] Fix iOS issue when scrolling left #439
Conversation
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.
What about the vertical scrolling?
I have left a couple of boy scout comments
packages/grid/_modules_/grid/hooks/virtualization/useVirtualRows.ts
Outdated
Show resolved
Hide resolved
packages/grid/_modules_/grid/hooks/virtualization/useVirtualRows.ts
Outdated
Show resolved
Hide resolved
packages/grid/_modules_/grid/hooks/virtualization/useVirtualRows.ts
Outdated
Show resolved
Hide resolved
packages/grid/_modules_/grid/hooks/virtualization/useVirtualRows.ts
Outdated
Show resolved
Hide resolved
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.
need to handle vertical scrolling too
I added additional check for vertical scrolling. It suffered from the same problem. |
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 have observed 4 other different rendering issues on iOS, but that for another day.
packages/grid/_modules_/grid/hooks/virtualization/useVirtualRows.ts
Outdated
Show resolved
Hide resolved
packages/grid/_modules_/grid/hooks/virtualization/useVirtualRows.ts
Outdated
Show resolved
Hide resolved
…ws.ts Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
This PR fixes an iOS scroll stretching issue that is visible when the user tries to scroll left while the grid is at the left position of 0. The issue occurs because when you scroll on an IOS device a scroll event is fired even if there is no space to scroll in that direction (scroll bouncing).
The fix is achieved by checking the
event.target.scrollLeft
and if it is < 0 prevent the update of the viewport.Fixes #269