mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-22 07:40:32 +00:00
feat: style read-only drawers.
fix: empty state in resources tables.
This commit is contained in:
@@ -20,25 +20,23 @@ import { compose, transformTableStateToQuery } from 'utils';
|
||||
function PaymentMadeList({
|
||||
// #withPaymentMades
|
||||
paymentMadesTableState,
|
||||
paymentsTableStateChanged,
|
||||
|
||||
// #withPaymentMadeActions
|
||||
setPaymentMadesTableState
|
||||
resetPaymentMadesTableState,
|
||||
}) {
|
||||
// Resets the invoices table state once the page unmount.
|
||||
React.useEffect(
|
||||
() => () => {
|
||||
setPaymentMadesTableState({
|
||||
filterRoles: [],
|
||||
viewSlug: '',
|
||||
pageIndex: 0,
|
||||
});
|
||||
resetPaymentMadesTableState();
|
||||
},
|
||||
[setPaymentMadesTableState],
|
||||
[resetPaymentMadesTableState],
|
||||
);
|
||||
|
||||
return (
|
||||
<PaymentMadesListProvider
|
||||
query={transformTableStateToQuery(paymentMadesTableState)}
|
||||
tableStateChanged={paymentsTableStateChanged}
|
||||
>
|
||||
<PaymentMadeActionsBar />
|
||||
|
||||
@@ -56,8 +54,9 @@ function PaymentMadeList({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
withPaymentMades(({ paymentMadesTableState }) => ({
|
||||
withPaymentMades(({ paymentMadesTableState, paymentsTableStateChanged }) => ({
|
||||
paymentMadesTableState,
|
||||
paymentsTableStateChanged,
|
||||
})),
|
||||
withPaymentMadeActions
|
||||
withPaymentMadeActions,
|
||||
)(PaymentMadeList);
|
||||
|
||||
Reference in New Issue
Block a user