Skip to content

Commit

Permalink
fix(components): fix totalLength integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Sep 19, 2023
1 parent 274dc60 commit 0522b34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export interface TableProps<Data extends object = any> extends TableOptions<Data
* Pagination steps list
*/
pageSizes?: number[];
/**
* Total length of the data
*/
totalLength?: number;
/**
*
*/
Expand Down Expand Up @@ -126,6 +130,7 @@ export function useCustomTable<Data extends object = {}>(props: PropsWithChildre
filterId: controlledFilterId,
pageSize: controlledPageSize,
pageIndex: controlledPageIndex,
totalLength,
sortBy: controlledSortBy,
isLoading,
disableFilters,
Expand Down Expand Up @@ -225,6 +230,7 @@ export function useCustomTable<Data extends object = {}>(props: PropsWithChildre
pageIndex,
pageSize,
pageSizes,
totalLength,
setPageSize,
i18n,
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function Table<Data extends object = any>(props: PropsWithChildren<TableP
pageSize,
pageSizes,
setPageSize,
totalLength,
i18n,
enableDragNDrop,
children,
Expand Down Expand Up @@ -81,6 +82,7 @@ export function Table<Data extends object = any>(props: PropsWithChildren<TableP
<div className={"overflow-hidden"}>
<Pagination
{...tableInstance}
totalLength={totalLength}
className={"text-sm"}
pageIndex={pageIndex}
pageSize={pageSize}
Expand Down

0 comments on commit 0522b34

Please sign in to comment.