Open PranKe01 opened 1 year ago
Any update on this? @mertsincan Can you add the bug label?
try using:
{ showSpacer: false, }
in virtualScrollOptions.
This worked for me.
try using:
{ showSpacer: false, }
in virtualScrollOptions.
This worked for me.
I tried it. Does not work for me.
@mertsincan The stackblitz button in the https://www.primefaces.org/primeng/scroller page does not work. It says "page not found": https://stackblitz.com/edit/primeng-scroller-demo
Also the v14 page is not accessible directly: https://www.primefaces.org/primeng-v14/setup It redirects to primeng.org and shows nothing.
I observed the same issue, combined with the sorting in a table. Sometimes it happens, that after scrolling down and sorting a column, the top rows are not available/visible and a big white space is visible. :(
I could fix the sorting issue by manually resetting the transform property of p-scroller-content:
const scrollerContent = $('#tableId tbody.p-element.p-datatable-tbody.p-scroller-content'); scrollerContent?.css('transform', 'translate3d(0px, 0px, 0px)');
@mertsincan Anyhow, this should get fixed by primeng itself.
@mertsincan Issue still exists in v16.0.0.
try using:
{ showSpacer: false, }
in virtualScrollOptions.
This worked for me.
This helped. I tweaked other virtualScrollOptions
too. I think trackBy
helps too.
virtualScrollDelay="0"
[virtualScrollOptions]="{
showSpacer: false,
showLoader: false,
trackBy: getTrackByFn,
}"
Describe the bug
When the size of the Scroller component is changed, there is a white space, instead of showing the items. Whenever we scroll, items are getting added, but still some white space is left. That issue also applies to the Table, as it uses the Scroller internally.
As I use the Lazy loading Table in a flex layout, where users can change size of different areas, the Table shows whitespace, when extending the height of the Table.
For now I added virtualScrollOptions.numToleratedItems and set it to a high number, to make sure more rows are loaded:
scrollHeight="{{ height === 0 ? 'flex' : scrollHeight + 'px' }}" [virtualScrollOptions]="height === 0 ? { numToleratedItems: 50 } : {}"
Anyhow, this leads to worse performance and misstyling whenever the "loading indicator" is shown, because here again white space is shown.
Environment
PrimeNG showcase/documentation on a Windows computer using Chrome.
Reproducer
https://www.primefaces.org/primeng/scroller
Angular version
14
PrimeNG version
14.2.2
Build / Runtime
TypeScript
Language
TypeScript
Node version (for AoT issues node --version)
14.21.0
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
When changing the size of a Scroller/Table (for example in a flex layout within the Splitter component), no white space should be shown, but the rows should be visible. Same applies when scrolling.