Hex Core JS
    Preparing search index...

    Function useTablePagination

    • Handles paginating table data. Outputs can be passed directly to a <PageButtonsSet> (from @hex-insights/core) component to allow users to control pagination.

      Type Parameters

      • T extends Record<any, any>

      Parameters

      Returns {
          pageNumber: number;
          paginatedData: T[];
          setPageNumber: Dispatch<SetStateAction<number>>;
          totalPages: number;
      }

      Pagination should be performed on filtered and sorted data (if doing so) rather than performing filtering/sorting on paginated data.