primefaces / primeng

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

Component: Tree table with virtual scroll issue #12844

Open gcannone opened 1 year ago

gcannone commented 1 year ago

Describe the bug

We encountered a problem using the virtual scroll on treeTable with scrollHeight set in px. When the number of items does not fill the whole page, or there are collapsed nodes, instead of appearing the empty space under the tree-table rows, the tree-table rows increase their height. Is there a way to avoid this row height variability?

Environment

scrollHeight => 400px virtualScroll => true virtualScrollItemSize => 40 In my scenario, the tree table has only two rows and the rowHeight is much greater than 40, creating a very unsightly situation graphically.

Reproducer

No response

Angular version

15.1.5

PrimeNG version

15.2.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.10.0

Browser(s)

Chrome

Steps to reproduce the behavior

Create a tree table with the following parameters and only two rows as values:

scrollable => true scrollHeight => 400px virtualScroll => true virtualScrollItemSize => 40

Expected behavior

I expect that the single row height is always 40px and not variable based on how many rows the tree table has.

gcannone commented 1 year ago

Is it possible to get feedback on the problem described?

flkeller commented 1 year ago

Still no one at least having a look over it? Issue still persists. Virtual scroll not usable in TreeTable

MBJ554 commented 11 months ago

No one has found a solution for this yet?

MBJ554 commented 10 months ago

@gcannone @flkeller If you still need a work around, I have managed to fix it for my end atleast. adding a display: flex; to the <tr> seems to stop it from stretching.

hoangphuc2k commented 10 months ago

any update this issue?

SultanGabriel commented 6 months ago

any updates? I am having the same issue.

hoanganhbong commented 3 months ago

same issue, any solution yet ?

Erledus commented 2 months ago

beside maybe the Display Flex solution, for me it worked to set a min-height in tablestyle on the [tableStyle]="{ 'min-width': '40rem', 'min-height': '51px' }"