fix: inconsistance page size of paginated data tables

This commit is contained in:
Ahmed Bouhuolia
2024-08-14 15:23:14 +02:00
parent 64c4d7b5a4
commit 5c1fa8f5cd
9 changed files with 29 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ import withAlertsActions from '@/containers/Alert/withAlertActions';
import withDialogActions from '@/containers/Dialog/withDialogActions';
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
import withSettings from '@/containers/Settings/withSettings';
import withItems from './withItems';
import { useItemsListContext } from './ItemsListProvider';
import { useItemsTableColumns, ItemsActionMenuList } from './components';
@@ -43,6 +44,9 @@ function ItemsDataTable({
// #withSettings
itemsTableSize,
// #withItems
itemsTableState,
// #ownProps
tableProps,
}) {
@@ -137,6 +141,7 @@ function ItemsDataTable({
sticky={true}
rowClassNames={rowClassNames}
pagination={true}
initialPageSize={itemsTableState.pageSize}
manualSortBy={true}
manualPagination={true}
pagesCount={pagination.pagesCount}
@@ -174,4 +179,5 @@ export default compose(
withSettings(({ itemsSettings }) => ({
itemsTableSize: itemsSettings.tableSize,
})),
withItems(({ itemsTableState }) => ({ itemsTableState }))
)(ItemsDataTable);