Please help: huge data set, scrollHeight = flex, virtualScroll = on, row height not constant

UI Components for Angular
Post Reply
jakubhoblik
Posts: 1
Joined: 26 Sep 2022, 09:26

26 Sep 2022, 09:38

Hello,

I would like to ask for help when handling huge dataset. (I read the documentation and I acknowledge that the best way would be lazy loading).

What I have is an array with 20 000 items.

I need my table to have scrollHeight set to flex to fit it's parent height.
Then I wish to have virtualScroll enabled but I can not set virtualScrollItemSize because I need to have rows with different height. When virtualScrollItemSize is not set then the scrolling jumps - what I mean by this is that when I scroll with mouse wheel I see rows with id from 1 to 15 then I scroll down and it jumps to row with id 30. Also the last row is cropped and it's flickering.

So basically my question is, Is there a way how to use virtuallScroll without setting row height to be constant?

I'm using angular 14 with primeng 14.

Thank you.

ceravolo
Posts: 1
Joined: 30 Sep 2022, 18:33

30 Sep 2022, 18:42

I'm facing the same issue, <p-table> with lazy load and virtual scroll doesn't proper work when the row height is variable. It only works if we set the <tr> height to be exacly the value passed in the [virtualScrollItemSize] input.

This started to happen after migrating to NgPrime 14, prior, with version 13, it accepted variable row heights (actually we didn't need to set any height in the <tr> elements).

tonyadams
Posts: 2
Joined: 03 May 2023, 08:59

23 Jun 2023, 09:38

You can implement virtual scrolling with varying row heights in fnf Angular and PrimeNG by estimating an average row height and setting a value close to it for virtualScrollItemSize. This approach can help improve scrolling behavior while accommodating rows with different heights.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests