React-virtualized: MultiGrid alignment when scrolled to far-right or bottom

Created on 11 Jan 2017  路  10Comments  路  Source: bvaughn/react-virtualized

I was trying out the MultiGrid demo at https://bvaughn.github.io/react-virtualized/#/components/MultiGrid and noticed a problem when scrolling to the far-right or bottom.

multi-grid-alignment

The columns in the top grid become misaligned with the main grid body. (Same for the rows when scrolling to bottom.)

I assume this is due to the presence of the scrollbar in one div causing an offset?

Tested in Chrome 55 and Firefox 50

bug

Most helpful comment

It's not pretty but it's a workaround:

https://gist.github.com/jeffvan576/dd6ad36869fff28be9043d9e28307135

Then feed in adjustedMeasurement.height and adjustedMeasurement.width instead of the AutoSizer width and height. Seems to be working here so far. Again, not pretty but a temporary patch.

All 10 comments

I noticed this as well, with a pretty wide table (10k items by 70px), it actually seems to distort more or less based on scroll:

image

Direction seems to affect it as well:

https://v.usetapes.com/Qg5Mlwx5Dr

Running into the same issue using ScrollSync
image

image

Makes sense; MultiGrid uses ScrollSync internally, unfortunately.

Has anyone been able to find a temporary workaround for this by a chance? It'd be great if you shared.

It's not pretty but it's a workaround:

https://gist.github.com/jeffvan576/dd6ad36869fff28be9043d9e28307135

Then feed in adjustedMeasurement.height and adjustedMeasurement.width instead of the AutoSizer width and height. Seems to be working here so far. Again, not pretty but a temporary patch.

Seems because of scrollbars. On chrome I can hide the scrollbars using this css

.grid-parent *::-webkit-scrollbar {
    width: 0px;
    height: 0px;
}

But for ff, I have to use @jeffvan576 solution. Would be nice to have it fixed in react-virtualized itself.

Fixed this, although I'm not _super_ thrilled with the fix. Check out 9.2.1 ...

Still not fixed. To see it, put the cell border to black, not grey. With grey, it's hard to see. Scroll both with the scroll bar thumb and also with scroll bar end and start thumb. It's still not lined up perfectly, although very close.

still not fixed

Just to confirm, this still is not fixed and does not work...

Was this page helpful?
0 / 5 - 0 ratings