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

Datatable: VirtualScroller is not smooth and fails to reach bottom of table #4577

Open
raymolla7 opened this issue Jun 29, 2023 · 8 comments
Labels
Type: Bug Issue contains a defect related to a specific component.

Comments

@raymolla7
Copy link

raymolla7 commented Jun 29, 2023

Describe the bug

Just a simple DataTable with resizable columns and virtual scroll.

There are a few issues in PrimeReact V9 that did not exist in V8.

With the description column set to width of 4rem:
- Expected: The description column has width of 4rem and the text is truncated
- Actual: The column width is expanded to the largest text

When scrolling the table:
- Expected: The column widths stay the same
- Actual: The columns widths shift and change size'

EDIT: The above two have been solved by applying CSS tablelayout to "fixed'

When scrolling to the bottom of the table:

  • Expected: Scrolling is smooth
  • Actual: Scrolling is janky and does not reach bottom

Reproducer

https://codesandbox.io/s/primereact-table-issues-s8wgkg?file=/src/App.js:486-501

PrimeReact version

9.6.0

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

See the codesandbox link above

Expected behavior

No response

@raymolla7 raymolla7 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 29, 2023
@melloware
Copy link
Member

Can you check #4078 especially the section on autoLayout. I think you need to use "fixed" to make it work like v8 used to

@raymolla7
Copy link
Author

raymolla7 commented Jun 29, 2023

@melloware Thanks for the tip, I just added "fixed" and it solved the first two issues! I just updated the codesandbox:

https://codesandbox.io/s/primereact-table-issues-s8wgkg?file=/src/App.js

However the third issue still persists, the virtual scroller is quite janky and fails at the bottom of the scroll. This third issue may have also existed in V8.

@raymolla7 raymolla7 changed the title Datatable: Issues regarding column widths, virtualScroller, resizable columns Datatable: VirtualScroller is not smooth and fails to reach bottom of table Jun 29, 2023
@melloware
Copy link
Member

Awesome. Do you mind searching for other virtual scroller issues I feel like this may have been reported already?

@raymolla7
Copy link
Author

There is a similar issue #2854

But the flickering in my Repo appears more Janky/Severe, and mine you can't scroll to the bottom, but the repo in that one you can scroll to the bottom.

@raymolla7
Copy link
Author

raymolla7 commented Jun 29, 2023

I also just tried the workaround @ttongsul offered in #2854

https://codesandbox.io/s/primereact-virtual-scroll-with-workaround-5hjncp?file=/src/App.js

It appears to help a bit! But still experiencing significant jank and I am still unable to scroll to the bottom.

@melloware
Copy link
Member

Ok then yep sounds like it is still broken

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 26, 2023
@irv075
Copy link

irv075 commented Apr 23, 2024

Still an issue in 10.5.0, is there any progress on this?

@celestialvigor
Copy link

What is strange is that primereact, primevue, and primeng all have the same issue with their DataTable, and it appears when the itemSize value is smaller than 46 (not sure how much smaller, but try a value in the 20s). It seems to be an approach-based problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

4 participants