{"repo":"WNortier/ts-paginator","free":true,"listed":false,"github":"https://github.com/WNortier/ts-paginator","clone":"git clone https://github.com/WNortier/ts-paginator.git","description":"ts-paginator is a TypeScript pagination hook for React or NextJS","language":"TypeScript","stars":17,"topics":["frontend","javascript","nextjs","pagination","pagination-library","react","typescript","jest"],"license":null,"category":"saas-starters-boilerplates","readme_excerpt":"ts-paginator ### ts-paginator is an unopinionated TypeScript pagination hook for React or NextJS — designed to let you build your own pagination UI. Args Instantiate the useTsPaginator hook with the following arguments: Args Description -------------------------------- ----------------------------------------- totalRecordCount: number The total count of records currentPage: number The current page selection (zero indexed) rowsPerPage: 10 (default 10 ) The current rows per page selection UI/UX Functions Function Description Args Return Type Example Returns ---------------------------------- ------------------------------------------------------------------------------------------------------- -------------------------- ----------- ---------------------------------- determinePaginationMessage Calculates the pagination message options?: { verb: 'Showing' OR 'Displaying', noun?: string, hideMessageOnZeroRecords: boolean } string Displaying 1 to 10 of 20 records determineRowsPerPageOptions Calculates the rows per page options number[] [10] determinePaginationPages Calculates the pagination pages and uses 0 as a range placeholder for page ranges greater than three number[] [1, 2] determinePaginationDisabledState Can be used to disable the previous page or next page button boolean true State Altering Functions Function Description Args Return Type ------------------------------ ------------------------------ ----------------------------- ----------- handleChangeTotalRecordCount Chan","default_branch":null,"files":null,"tree":[],"storefront":"/r/WNortier","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/WNortier/ts-paginator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}