improvement: add pagination, search and column sort to service token table and improve table rows

This commit is contained in:
Scott Wilson
2025-06-16 16:13:09 -07:00
parent a89bd08c08
commit 6eaa16bd07
3 changed files with 269 additions and 71 deletions
@@ -70,7 +70,15 @@ export const Pagination = ({
key={`pagination-per-page-options-${perPageOption}`}
icon={perPage === perPageOption && <FontAwesomeIcon size="sm" icon={faCheck} />}
iconPos="right"
onClick={() => onChangePerPage(perPageOption)}
onClick={() => {
const totalPages = Math.ceil(count / perPageOption);
if (page > totalPages) {
onChangePage(totalPages);
}
onChangePerPage(perPageOption);
}}
>
{perPageOption} rows per page
</DropdownMenuItem>