Pagination
Introduction
Parameters
INFO
page
parameter specifies the page index, effectively indicating the page number being requested. The limit
parameter determines the page size, representing the number of data items or rows to be retrieved per page. For instance, if a component displaying a list of companies shows 20 items per page, the limit should be set to 20. The current page number should be provided through the page parameter, and this number should be incremented with each subsequent pagination request to fetch the next set of data.TIP
TIP
totalRecords
in the response, along with the list data. This property is essential for managing pagination and determining when to fetch the next set of data. By comparing the total number of records with the number of records currently fetched, you can effectively control the pagination process. If the number of currently fetched records is less than the total records, the facility to fetch the next set of data should remain enabled. Conversely, if all records have been fetched, the data-fetching mechanism can be disabled. This method ensures efficient data retrieval and smooth user experience by dynamically managing the availability of additional data based on the total and currently fetched records.NOTE
Search Pagination
Modified at 2024-07-19 08:36:10