-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
MultiGrid falls out of sync when scrolling #971
Comments
This looks like a duplicate of #647 and #291. Check out my responses to those issues (like this one). I don't think there's anything There are some techniques that you could try (discussed on #291) to force the event handling to be sync for your synced grids, if you'd like. I haven't tried them myself so I can't vouch for them. I always welcome PRs to improve performance and developer experience for |
Brian, thanks a lot for this project and nice fast response to this issue. And sorry for duplication, I have tried to avoid that but failed :-). I have checked out fixed-data-table and it scrolls very well for me. So just out of curiosity, is this performance penalty for using UI thread for scrolling only noticeable when cells have a complex and slow layout to render? If so, why not have a prop which controls whether to use/not use UI thread? I am very new to web front-end world, sorry if my question is stupid :-). |
No worries. It's hard when there are hundreds of issues. I have trouble deduping myself sometimes, and I've seen them all before.
Yes-ish. This will vary based on the specs of the computer running it, how much work it is to render the cells, what else is being done at that time in the page (eg other JavaScript and rendering), etc.
Complexity! 😄 I don't want to build two implementations. PS. No worries. It's not at all a stupid question. |
@OleksandrNechai on root node of your component you have to add this css #example::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
} Going to dig into rendering theory and found solutions for other browsers and I can make PR if I am lucky |
@wtfil , thank you very much for looking at this problem :-) It still bugs me. My users, however, do not complain yet :-) |
@wtfil nice workaround. Scroll is really synced but for some reason this solution makes grid slow to be slow. But synced with fixed columns and rows :) @bvaughn I have question about fixed columns / rows feature.
It should be very simple in runtime and without scroll sync problems because there is nothing to sync. |
I made some experiments
|
@tuchk4 As for me, I plan to append a list inside the outter div to achieve something like this CodePen Demo |
@tuchk4 The problem with async scroll is not something directly related to the |
When scroll (with a scroll wheel on the mouse, Windows 10, Chrome, Edge, Firefox) during a very short period of time parts of MultiGrid are out of syn, then they get back to sync.
This is how it looks like irrespective of the size of the grid:
![](https://camo.githubusercontent.com/bb287532936236faef54257672b719c7b1fcf660b4675813e152f50964884975/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f77393731772e676966)
Here is a screenshot of this moment when main data grid and it's fixed part are out of sync:
![](https://camo.githubusercontent.com/637243ea17cbbc7f82316631d14fd4980b610d8799fcd1e44a86ac2d72c163df/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f613745774c2e706e67)
Here the CodePen to reproduce.
The text was updated successfully, but these errors were encountered: