mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
fix: inconsistance page size of paginated data tables
This commit is contained in:
@@ -19,6 +19,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 withCreditNotes from './withCreditNotes';
|
||||
|
||||
import { useCreditNoteTableColumns, ActionsMenu } from './components';
|
||||
import { useCreditNoteListContext } from './CreditNotesListProvider';
|
||||
@@ -44,6 +45,9 @@ function CreditNotesDataTable({
|
||||
|
||||
// #withSettings
|
||||
creditNoteTableSize,
|
||||
|
||||
// #withCreditNotes
|
||||
creditNoteTableState
|
||||
}) {
|
||||
const history = useHistory();
|
||||
|
||||
@@ -129,6 +133,7 @@ function CreditNotesDataTable({
|
||||
noInitialFetch={true}
|
||||
sticky={true}
|
||||
pagination={true}
|
||||
initialPageSize={creditNoteTableState.pageSize}
|
||||
pagesCount={pagination.pagesCount}
|
||||
TableLoadingRenderer={TableSkeletonRows}
|
||||
TableHeaderSkeletonRenderer={TableSkeletonHeader}
|
||||
@@ -159,4 +164,5 @@ export default compose(
|
||||
withSettings(({ creditNoteSettings }) => ({
|
||||
creditNoteTableSize: creditNoteSettings?.tableSize,
|
||||
})),
|
||||
withCreditNotes(({ creditNoteTableState }) => ({ creditNoteTableState }))
|
||||
)(CreditNotesDataTable);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -144,6 +144,7 @@ function InvoicesDataTable({
|
||||
noInitialFetch={true}
|
||||
sticky={true}
|
||||
pagination={true}
|
||||
initialPageSize={invoicesTableState.pageSize}
|
||||
manualPagination={true}
|
||||
pagesCount={pagination.pagesCount}
|
||||
autoResetSortBy={false}
|
||||
|
||||
@@ -130,6 +130,7 @@ function ReceiptsDataTable({
|
||||
noInitialFetch={true}
|
||||
sticky={true}
|
||||
pagination={true}
|
||||
initialPageSize={receiptTableState.pageSize}
|
||||
pagesCount={pagination.pagesCount}
|
||||
manualPagination={true}
|
||||
autoResetSortBy={false}
|
||||
|
||||
Reference in New Issue
Block a user