feat(FinancialReports): add loading progress bar.

fix(preformance): Optimize preformance of virtualized list.
fix(preformance): Optimize financial reports preformance.
This commit is contained in:
a.bouhuolia
2021-03-16 17:27:27 +02:00
parent f1cf02c9df
commit 42230fe64b
73 changed files with 969 additions and 320 deletions

View File

@@ -2,6 +2,7 @@ import React from 'react';
import { Button } from '@blueprintjs/core';
import { Icon, If } from 'components';
import { useBalanceSheetContext } from './BalanceSheetProvider';
import FinancialLoadingBar from '../FinancialLoadingBar';
/**
* Balance sheet alerts.
@@ -13,7 +14,7 @@ export function BalanceSheetAlerts() {
balanceSheet,
} = useBalanceSheetContext();
// Handle recalculate the report button.
// Handle refetch the report sheet.
const handleRecalcReport = () => {
refetchBalanceSheet();
};
@@ -34,3 +35,18 @@ export function BalanceSheetAlerts() {
</If>
);
}
/**
* Balance sheet loading bar.
*/
export function BalanceSheetLoadingBar() {
const {
isFetching
} = useBalanceSheetContext();
return (
<If condition={isFetching}>
<FinancialLoadingBar />
</If>
)
}