0

Is there any way to rest the page links to before page request in the table's paginator?

Using lazy option to load pages from the server. However under certain circumstances I need to cancel the lazy load request. I do this by ignoring requested page and not updating the data. However I cannot figure out how to reset the page link back to the the page before the request. The page link that user clicks stays highlighted.

Shawn
  • 1
  • This is the scenario, User is looking at page 1. User clicks on next page or page 2, and onLazyLoad is called, the component asks user if they want to continue loading page 2 or cancel page request. By this time page 2 link has selected style. User cancels the page request, at this point I need to set the page link back to page 1. I hope this clears it. – Shawn Apr 02 '19 at 15:28

1 Answers1

1

The answer is not really, Lazy loading pages are done using import() that is returning a Promise so you can use Bluebird or another CancellationToken mechanism to try do so:

https://medium.com/@benlesh/promise-cancellation-is-dead-long-live-promise-cancellation-c6601f1f5082

Zarna Borda
  • 695
  • 1
  • 6
  • 22
Alon Valadji
  • 628
  • 4
  • 8