Hello everyone,
I’m currently working on a project that involves a dynamic table repeater with pagination. I’ve encountered an issue related to pagination when adding new items dynamically, and I’m seeking your expertise to help me resolve it.
Scenario:
- I have a dynamic table repeater that displays 10 items per page.
- Pagination is in place to navigate through different pages of the repeater.
- A “Add row” button allows users to add new rows/items to the repeater.
Issue:
The problem arises when I add the 11th item. At this point, I want the current page to automatically become the new second page (Page 2 of 2), and the newly added item to appear at the top of the second page.
Desired Outcome:
- When the 11th item is added, the current page should transition to Page 2 of 2.
- The 11th item should be displayed on the second page.
I’m seeking guidance on how to approach this scenario effectively. How can I ensure that when the 11th item is added, the current page becomes Page 2 of 2, and the item appears there? If anyone has experience with similar pagination scenarios or can suggest a smart way to handle this, I would greatly appreciate your insights.
Thank you in advance for your time and assistance!