primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.6k stars 4.62k forks source link

Table: Using Virtual scrolling with frozen columns doesn't scroll up at the bottom of the table #16432

Open AlaaMZayed opened 2 months ago

AlaaMZayed commented 2 months ago

Describe the bug

Creating table and using Virtual scrolling with frozen columns (1 or more) doesn't scroll up if you are at the bottom of the table. the scroll bar keeps jumping up and down and the table is always at the last row. The scroll is not smooth and scroll bar is not moving correctly

Environment

stackblitz example

Reproducer

No response

Angular version

18.0.2

PrimeNG version

17.18.10

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.09

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Go to the bottom of the table.
  2. Using the touch pad or mouse wheel then scroll up.
  3. The table doesn't scroll up and scroll bar is jumping.

Expected behavior

The scroll should be smooth and the bar moves correctly to the scrolling position

github-actions[bot] commented 5 days ago

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles:

stylepatrick commented 4 days ago

We do have exactly the same issue with the virtual scrolling with frozen columns.

What we found out is that it works with <= 35 rows. When >36 rows are in the table the scrolling does no longer work correctly.

table-virtual-scroll-demo.ts this.cars = Array.from({ length: 36 }).map((_, i) => this.carService.generateCar(i + 1) );

Example: https://stackblitz.com/edit/mdzxe4-a3m2x6?file=src%2Fapp%2Ftable-virtual-scroll-demo.html