This commit adds the implementation for local pagination in the withPagination function. It allows for displaying a subset of items from a larger collection, based on the current page and page size.
The withPagination function accepts an optional collection parameter to support multiple paginated collections. It calculates the selected page entities, total count, total pages, and page navigation array based on the provided options.
Additionally, utility functions like gotoPage, setPageSize, nextPage, previousPage, firstPage, and setMaxPageNavigationArrayItems are provided to easily update the pagination state.
This commit adds the implementation for local pagination in the
withPagination
function. It allows for displaying a subset of items from a larger collection, based on the current page and page size.The
withPagination
function accepts an optionalcollection
parameter to support multiple paginated collections. It calculates the selected page entities, total count, total pages, and page navigation array based on the provided options.Additionally, utility functions like
gotoPage
,setPageSize
,nextPage
,previousPage
,firstPage
, andsetMaxPageNavigationArrayItems
are provided to easily update the pagination state.