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

Fix #16246 TreeTable Spacer Size Calculation #16273

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johannes-wolf
Copy link

@johannes-wolf johannes-wolf commented Aug 22, 2024

Defect Fixes

Fixes #16246

Commit e7b611 introduced a regression in the size calculation for TreeTable component with a "flex" height configuration. The issue arises because the spacer size is no longer being updated correctly. As a result, the scrollbar resizes itself during scrolling, which causes jumping of the scrollbar.

I have replaced the window-size listener with a ResizeObserver, because the number of visible items in a TreeTable with virtual scrolling must get recalculated if the view size changes. The new observer should handle window size changes, important to the TreeTable, equally well.

Copy link

vercel bot commented Aug 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Aug 22, 2024 2:07pm

@johannes-wolf johannes-wolf marked this pull request as draft August 22, 2024 11:29
@johannes-wolf johannes-wolf force-pushed the fix-virtual-treetable-scrolling branch from f1804a5 to c879951 Compare August 22, 2024 12:14
@johannes-wolf johannes-wolf marked this pull request as ready for review August 22, 2024 12:39
@johannes-wolf johannes-wolf changed the title Fix TreeTable Spacer Size Calculation Fix #16246 TreeTable Spacer Size Calculation Aug 22, 2024
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

Successfully merging this pull request may close these issues.

Table: Scroller is broken when scrollHeight is flex
1 participant