I am trying to integrate ngx-infinite scroll library https://www.npmjs.com/package/ngx-infinite-scroll
with a primeng grid
https://www.primefaces.org/primeng-4.3.0/#/datatable
Has anyone tried to integrate those together or any other datatable.
I know this is old, but just in case some one wanted the same functionality, just use the infiniteScrollContainer
on the parent element of the p-table
or the p-table
and provide the class of .p-datatable-wrapper
as a value, it's the scrollable container of the table, as the following:
<div
class="p-3"
infiniteScroll
[infiniteScrollDistance]="2"
[infiniteScrollThrottle]="50"
(scrolled)="loadData()"
[infiniteScrollContainer]="'.p-datatable-wrapper'"
[scrollWindow]="false"
appScrollTopOn
>
<p-table> </p-table>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With