From b226ad9e27f67a800caacd4d2d91410eb75eded2 Mon Sep 17 00:00:00 2001 From: adamviktora Date: Mon, 18 Mar 2024 12:23:09 +0100 Subject: [PATCH] fix(TableSortableResponsive demo): end page number --- .../react-table/src/demos/examples/TableSortableResponsive.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-table/src/demos/examples/TableSortableResponsive.tsx b/packages/react-table/src/demos/examples/TableSortableResponsive.tsx index 5f089b071b9..288f9fd846c 100644 --- a/packages/react-table/src/demos/examples/TableSortableResponsive.tsx +++ b/packages/react-table/src/demos/examples/TableSortableResponsive.tsx @@ -88,7 +88,7 @@ export const TableSortableResponsive: React.FunctionComponent = () => { const kebabDropdownItems = [Some action]; React.useEffect(() => { - setSortedRows(sortedData.slice((page - 1) * perPage, page * perPage - 1)); + setSortedRows(sortedData.slice((page - 1) * perPage, page * perPage)); }, [sortedData, page, perPage]); const handleSetPage = (_evt: React.MouseEvent | React.KeyboardEvent | MouseEvent, newPage: number) => {