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

Component: Table with Scroll Height Flex and Virtual Scroll, ScrollBar flickers at the end #14034

Closed
nsaini-05 opened this issue Nov 5, 2023 · 6 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@nsaini-05
Copy link

nsaini-05 commented Nov 5, 2023

Describe the bug

When virtualScroll is set to true on table and scrollHeight is set to flex. Sometimes when scrolling to end (almost bottom) the table flickers and scrollbar thumb goes moves in weird position.

Also rows don't get populated when div is stretched as it should with scroll height flex

Environment

Forked from Flex Scroll Demo from Official Site

Reproducer

https://stackblitz.com/edit/emzgbf?file=src%2Fapp%2Fdemo%2Ftable-flexible-scroll-demo.html,src%2Fapp%2Fdemo%2Ftable-flexible-scroll-demo.scss,src%2Fstyles.scss

Angular version

16.2

PrimeNG version

16.7

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

NA

Browser(s)

Chrome

Steps to reproduce the behavior

Resize the Div

Move scrollbar to bottom

Expected behavior

is should not flick

@nsaini-05 nsaini-05 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 5, 2023
@certifirm
Copy link

I think that the component dispatch multiple time event (onChange) when it's created.

@Gykonik
Copy link

Gykonik commented Nov 7, 2023

I've got the same issue and would love to get any tips on how to resolve it :D

@bountyface
Copy link

You can solve the scrolling issue by setting the virtual scroll item size to the height of your rows in pixels. In your example above: [virtualScrollItemSize]="46"

The flickering of the headers should go away if you set the column widths to a fixed value manually.

@john8329
Copy link

Virtual scrolling & lazy loading never worked good. I've been trying it since v11, and it's a gamble every time. Each version has something that fails, except maybe v13 with caveats. Not even the example in the documentation works, and the page that shows this precise integration has disappeared too. I've been opening an issue a while ago with perfect reproducibility and it was left unnoticed, no matter how many had the same issue. I'm even trying the LTS versions, which are supposed to be stable, and they have problems as well.

@mkutowski
Copy link

Virtual scrolling & lazy loading never worked good. I've been trying it since v11, and it's a gamble every time. Each version has something that fails, except maybe v13 with caveats. Not even the example in the documentation works, and the page that shows this precise integration has disappeared too. I've been opening an issue a while ago with perfect reproducibility and it was left unnoticed, no matter how many had the same issue. I'm even trying the LTS versions, which are supposed to be stable, and they have problems as well.

Yep it's kind of sad how scrolling can be so messed up. Using a fixed virtaulScrollItemSize also doesnt work once table rows heights vary more than 5px.

Virtual Scroll also exists in multiple components so i've seen dropdowns, multi-selects, etc all plagued by same issues.

@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation and try the latest PrimeNG version(v19). If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

7 participants