view_components icon indicating copy to clipboard operation
view_components copied to clipboard

NavigationList should have support for pagination

Open vsvipul opened this issue 3 years ago • 0 comments

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.

vsvipul avatar Aug 16 '22 05:08 vsvipul