Skip to content
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

When row span scrolls, the merged row will be invalid #156

Closed
condorheroblog opened this issue May 26, 2020 · 6 comments
Closed

When row span scrolls, the merged row will be invalid #156

condorheroblog opened this issue May 26, 2020 · 6 comments

Comments

@condorheroblog
Copy link

In my project, seven rows of tables are required to be merged, but I found that if the row span value is greater than three, the merged row will fail when scrolling. Here's the picture: is there a solution.

When row span scrolls, the merged row will be invalid

@condorheroblog
Copy link
Author

The code of merging three lines in the figure is the same as the code below the GIF figure

columns[rowSpanIndex].rowSpan = ({ rowData, rowIndex }) => rowIndex % 3 === 0 && rowIndex <= data.length - 3 ? 3 : 1

If it is greater than five lines, stop scrolling, and the merged line is invalid all the time
image

When it is less than five lines, it will flash down only when rolling.

Look forward to your reply. 🙏🙏🙏

@nihgwu
Copy link
Contributor

nihgwu commented May 26, 2020

I understand the problem here, and the reason is the merged row is recycled because of virtualization, you can set overscanCount to ease the problem, but it's still not ideal, it works great if you scroll down, but if you scroll up, the overscan don't works so well as expected

@nihgwu nihgwu closed this as completed May 29, 2020
@giiska
Copy link

giiska commented Jun 18, 2020

_getVerticalRangeToRender() has lines in react-window src/createGridComponent.js

      const overscanBackward =
        !isScrolling || verticalScrollDirection === 'backward'
          ? Math.max(1, overscanCountResolved)
          : 1;

when isScrolling this always return 1

@StianIsmar
Copy link

StianIsmar commented Feb 9, 2021

      const overscanBackward =
        !isScrolling || verticalScrollDirection === 'backward'
          ? Math.max(1, overscanCountResolved)
          : 1;

Is this a working solution for you?

If so- where do you pass in overScanCountResolved?

@Yeenot
Copy link

Yeenot commented Mar 25, 2022

@nihgwu @StianIsmar Is there any workaround on solving this flickering issue when scrolling down?

@seonghong1
Copy link

We're having the same problem Did you solve it?
If you solved it, what keywords did you use to solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants