How do you reset pagination in datatables after reloading?


Topic: How do you reset pagination in datatables after reloading?

vnagornyy pro premium priority asked 3 years ago

Expected behavior: Reloading data resets pagination.

Actual behavior: If you have 10 entries broken down into 1-5, 6-10 and you view 6-10 entries - after reloading the data pagination remains on 6-10 instead of resetting.

Resources (screenshots, code snippets etc.): For testing, I was using an example code from datatables async example which has a reload button. Here's a snippet to illustration the issue: https://mdbootstrap.com/snippets/standard/vnagornyy/3538344

Open the snippet, then click on the next arrow to advance to 6-10 entries. Then click reload button. After reloading, it remains on 6-10.

How can pagination be reset? Thanks.


Michał Duszak staff answered 3 years ago

Hello, unfortunately there is no method to set pagination to the first page programmatically at the moment.


vnagornyy pro premium priority commented 3 years ago

@Michał Duszak Thanks. Please do consider adding this as a method or as the default behavior when the update method is used.


Michał Duszak staff commented 3 years ago

Thank you for your feedback. I will forward this idea to the rest of the team.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.10.1
  • Device: PC
  • Browser: Chrome
  • OS: Win 10
  • Provided sample code: No
  • Provided link: Yes