Pagination - adding a "loader" until the next page is loaded

Hi all…
Ok… i have pagination on my page… that loads quite a bit of data. Now when i click on say page 2 or 3 there is a bit of a delay… before the next set of data is loaded … especially on mobile devices…

How can I add a “loading” screen or DIV… while waiting for the next pages data to load fully???
Because going between the pages with pagination… it takes 2 - 3 seconds on older mobiles…

Any clever ideas on is there a on load or on executer then clicking on the numbers itself?

You can show/hide a div using the dynamic attributes, while the server action is loading. There’s an “executing” state which you can use for this:

1 Like

Thanks the only issue i now have is… i have a scheduler that “refreshes” every 5 seconds… ill just have to find a way to do this…

++ ok found a work around ++
Just added a offsetprev on the pagination :slight_smile: so even with a scheduler… it will only run if not the same offset…
<div dmx-show="((sc.state.executing) && (query.offset != query.offsetprev))">loader</div>