view_components
view_components copied to clipboard
NavigationList should have support for pagination
For some use cases, where the items in a section are fairly long, it is better to have pagination to reduce page load time. This is a feature request for the same. We can have a Show More button that load subsequent pages after page 1 from the src.
We can add support for code like this -
<% component.with_paginated_section(src: PAGINATED_LINK_HERE, total_pages: TOTAL_PAGES_HERE) %>
We will just append ?page=PAGE_NUMBER to the PAGINATED_LINK to fetch the relevant page and add it to the list. The TOTAL_PAGES number will be required to know when to hide the Show More button.