Hi Luca,
Thanks for contacting Syncfusion Support
Query : Switching between pagination and
infinityScroll using external button
We have analyzed your query about switching between
pagination and infinity scroll using external button , we replicated your
sample and achieved your requirement. We suggest you to use enableScroll
property as false in pagination button and true in scroll button using the
infiniteOptions property. We have attached code snippet and a stackblitz sample
for your reference.
enablePagination(): void {
this.infiniteOptions = { enableScroll: false };
this.allowPaging = true;
}
enableInfinityScroll(): void {
this.infiniteOptions = { enableScroll: true };
this.allowPaging = false;
}
|
Stackblitz Sample: https://stackblitz.com/edit/angular-px7rqp-s8qdjn?file=app.component.ts,app.component.html,app%2Fapp.module.ts
Please let us know if you need any further assistance.
Regards,
Dineshnarasimman