Topic: How do you reset pagination in datatables after reloading?
vnagornyy priority asked 2 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 2 years ago
Hello, unfortunately there is no method to set pagination to the first page programmatically at the moment.
vnagornyy priority commented 2 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 2 years ago
Thank you for your feedback. I will forward this idea to the rest of the team.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- 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