PrimeNG- p-table Issue with virtual scroll not triggering event for big screens #3169
Unanswered
chaithanya008
asked this question in
PrimeNG
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Angular: 18.1.2
PrimeNG: 17.18.6
I have a p-table where the virtualscroll is triggering the event in laptop sized height (547px) but not for bigger displays like monitor (763px).
Using PrimeNG stackblitz with my parameters also gave same issue, a whitespace gap while scrolling (in the stackblitz they have loading UI otherwise it will be blank white space). Need to scroll much more to trigger the event.
Template code
<p-table #myID [columns]="myColumns" [value]="myValues" styleClass="p-datatable-striped p-datatable-something responsive-table" sortMode="multiple" [reorderableColumns]="true" [resizableColumns]="true" [rowHover]="true" dataKey="myKey" [lazy]="true" (onLazyLoad)="loadLazy($event)" [responsive]="true" [scrollable]="true" [(selection)]="selectedRow" [(contextMenuSelection)]="selectedSomething" [contextMenu]="contextMenuRef" [rows]="20" [lazyLoadOnInit]="true" [loading]="loading" [scrollHeight]="tableHeight" // 547px for laptop works fine, 763px for desktop doesnt work [virtualScroll]="true" [virtualScrollItemSize]="46" [rowTrackBy]="trackThis" #someThing (onColReorder)="myFn($event)" (onSort)="onSortSomething($event)" [multiSortMeta]="mySort" >
Component code
async loadLazy(event: TableLazyLoadEvent) { if (event) {
Please let me know for any gaps or how can it be resolved?
Beta Was this translation helpful? Give feedback.
All reactions