fix: initial page size to the data tables from store state

This commit is contained in:
Ahmed Bouhuolia
2024-08-14 22:12:21 +02:00
parent d9f241a2f8
commit 9f4de8115f
6 changed files with 17 additions and 1 deletions

View File

@@ -125,8 +125,9 @@ function ManualJournalsDataTable({
loading={isManualJournalsLoading}
headerLoading={isManualJournalsLoading}
progressBarLoading={isManualJournalsFetching}
pagesCount={pagination.pagesCount}
pagination={true}
initialPageSize={manualJournalsTableState.pageSize}
pagesCount={pagination.pagesCount}
autoResetSortBy={false}
autoResetPage={false}
TableLoadingRenderer={TableSkeletonRows}

View File

@@ -92,6 +92,7 @@ function InventoryAdjustmentDataTable({
manualSortBy={true}
selectionColumn={true}
pagination={true}
initialPageSize={inventoryAdjustmentTableState.pageSize}
pagesCount={pagination.pagesCount}
autoResetSortBy={false}
autoResetPage={false}

View File

@@ -130,6 +130,7 @@ function BillsDataTable({
noInitialFetch={true}
sticky={true}
pagination={true}
initialPageSize={billsTableState.pageSize}
pagesCount={pagination.pagesCount}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}

View File

@@ -17,6 +17,7 @@ import withAlertsActions from '@/containers/Alert/withAlertActions';
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
import withDialogActions from '@/containers/Dialog/withDialogActions';
import withVendorsCreditNotesActions from './withVendorsCreditNotesActions';
import withVendorsCreditNotes from './withVendorsCreditNotes';
import withSettings from '@/containers/Settings/withSettings';
import { useVendorsCreditNoteTableColumns, ActionsMenu } from './components';
@@ -32,6 +33,9 @@ function VendorsCreditNoteDataTable({
// #withVendorsCreditNotesActions
setVendorsCreditNoteTableState,
// #withVendorCredits
vendorsCreditNoteTableState,
// #withAlertsActions
openAlert,
@@ -129,6 +133,7 @@ function VendorsCreditNoteDataTable({
noInitialFetch={true}
sticky={true}
pagination={true}
initialPageSize={vendorsCreditNoteTableState.pageSize}
pagesCount={pagination.pagesCount}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}
@@ -159,4 +164,7 @@ export default compose(
withSettings(({ vendorsCreditNoteSetting }) => ({
creditNoteTableSize: vendorsCreditNoteSetting?.tableSize,
})),
withVendorsCreditNotes(({ vendorsCreditNoteTableState }) => ({
vendorsCreditNoteTableState,
})),
)(VendorsCreditNoteDataTable);

View File

@@ -112,6 +112,7 @@ function PaymentMadesTable({
noInitialFetch={true}
sticky={true}
pagination={true}
initialPageSize={paymentMadesTableState.pageSize}
pagesCount={pagination.pagesCount}
autoResetSortBy={false}
autoResetPage={false}

View File

@@ -33,6 +33,9 @@ function PaymentsReceivedDataTable({
// #withPaymentsReceivedActions
setPaymentReceivesTableState,
// #withPaymentsReceived
paymentReceivesTableState,
// #withAlertsActions
openAlert,
@@ -124,6 +127,7 @@ function PaymentsReceivedDataTable({
autoResetSortBy={false}
autoResetPage={false}
pagination={true}
initialPageSize={paymentReceivesTableState.pageSize}
pagesCount={pagination.pagesCount}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}