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

@@ -9,6 +9,7 @@ import withAlertsActions from '@/containers/Alert/withAlertActions';
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
import withDialogActions from '@/containers/Dialog/withDialogActions';
import withSettings from '@/containers/Settings/withSettings';
import withEstimates from './withEstimates';
import { TABLES } from '@/constants/tables';
import {
@@ -42,6 +43,9 @@ function EstimatesDataTable({
// #withSettings
estimatesTableSize,
// #withEstimates
estimatesTableState
}) {
const history = useHistory();
@@ -141,6 +145,7 @@ function EstimatesDataTable({
selectionColumn={true}
sticky={true}
pagination={true}
initialPageSize={estimatesTableState.pageSize}
manualPagination={true}
pagesCount={pagination.pagesCount}
TableLoadingRenderer={TableSkeletonRows}
@@ -174,4 +179,5 @@ export default compose(
withSettings(({ estimatesSettings }) => ({
estimatesTableSize: estimatesSettings?.tableSize,
})),
withEstimates(({ estimatesTableState }) => ({ estimatesTableState }))
)(EstimatesDataTable);