Merge pull request #3804 from Infisical/service-tokens-table-improvements

improvement(service-tokens): Improve Service Tokens Table
This commit is contained in:
Scott Wilson
2025-06-17 14:15:07 -07:00
committed by GitHub
4 changed files with 465 additions and 263 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>