bvaughn / react-virtualized

React components for efficiently rendering large lists and tabular data
http://bvaughn.github.io/react-virtualized/
MIT License
26.37k stars 3.06k forks source link

MultiGrid header misaligned horizontally and vertically at max scroll for grid #1162

Closed EdBoucher closed 3 weeks ago

EdBoucher commented 6 years ago

What is the current behavior?

When using the MultiGrid with AutoSizer and a grid that scrolls, when scrolling to the end of the grid the columns and rows in the header grids become misaligned. Looking at the code, an extra div element should be appended to the header to account for the space for the vertical scrollbars; this is missing. The onScrollbarPresenceChange handler also isn't invoked on the initial render when this fails, but on the computers where it doesn't it always is.

screen shot 2018-07-06 at 14 17 57

screen shot 2018-07-06 at 14 24 36

It doesn't appear to be an issue with custom scrollbars; the same issue occurs even when using normal ones. Annoyingly this is only on some of our systems, not all of them- but they're all using the same version of Chrome.

See https://codesandbox.io/s/8yvw057ov0 for an example. This is using the AutoSizer, but the problem persists even without it.

What is the expected behavior?

Scrolling to the end of the grid should see the headers aligned with the grid. A padding div should be created and appended to account for the scrollbars. The onScrollBarPresenceChange handler should be called.

Which versions of React and react-virtualized, and which browser / OS are affected by this issue?

Browser Chrome 67.0.3396.99
OS MacOS High Sierra 10.13.5
React 16.4.1
React DOM 16.4.1
react-virtualized 9.20.0
casvil commented 5 years ago

did you manage to fix it @EdBoucher ?

EdBoucher commented 5 years ago

I think we worked around it. Unfortunately I no longer work at the company that was having this problem, so they’ve probably replaced it with something else entirely

chebb44 commented 3 years ago

Anybody find working fix for that issue?

louisgenie commented 1 year ago

Anybody found a fix?