Skip to content

Commit 0215457

Browse files
committed
Pagination
1 parent 1b07e9f commit 0215457

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

stories/LoadingStates.stories.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const PaginationLoading: Story = {
6161
className: "w-full max-w-4xl",
6262
enablePagination: true,
6363
isPaginationLoading: true,
64+
totalRowCount: mediumDataSet.length,
6465
},
6566
};
6667

@@ -159,6 +160,7 @@ export const LoadingStateTransitions: Story = {
159160
isLoading={isLoading}
160161
isPaginationLoading={isPaginationLoading}
161162
pageIndex={currentPage}
163+
totalRowCount={mediumDataSet.length}
162164
onPaginationChange={(updater) => {
163165
const newState =
164166
typeof updater === "function"
@@ -221,7 +223,11 @@ export const TableWithLoadingStatesWrapper: Story = {
221223
isInitialLoading={isLoading}
222224
isPaginationLoading={isPaginationLoading}
223225
>
224-
<TableAdapter {...args} data={isLoading ? [] : mediumDataSet} />
226+
<TableAdapter
227+
{...args}
228+
data={isLoading ? [] : mediumDataSet}
229+
totalRowCount={mediumDataSet.length}
230+
/>
225231
</TableWithLoadingStates>
226232
</div>
227233
);

stories/TableAdapter.stories.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export const WithPagination: Story = {
9797
data: mediumDataSet,
9898
enablePagination: true,
9999
pageSize: 10,
100+
totalRowCount: mediumDataSet.length,
100101
},
101102
};
102103

@@ -272,5 +273,6 @@ export const CompleteExample: Story = {
272273
enableGlobalFilter: true,
273274
enableRowSelection: true,
274275
pageSize: 15,
276+
totalRowCount: largeDataSet.length,
275277
},
276278
};

0 commit comments

Comments
 (0)