feat: reset the state once closing categorization aside

This commit is contained in:
Ahmed Bouhuolia
2024-08-01 14:02:02 +02:00
parent 71e865e9b7
commit 5ce11f192f
2 changed files with 33 additions and 15 deletions

View File

@@ -19,13 +19,26 @@ function CategorizeTransactionAsideRoot({
// #withBanking
selectedUncategorizedTransactionId,
resetTransactionsToCategorizeSelected,
enableMultipleCategorization,
}: CategorizeTransactionAsideProps) {
//
//
useEffect(
() => () => {
// Close the reconcile matching form.
closeReconcileMatchingTransaction();
// Reset the selected transactions to categorize.
resetTransactionsToCategorizeSelected();
// Disable multi matching.
enableMultipleCategorization(false);
},
[closeReconcileMatchingTransaction],
[
closeReconcileMatchingTransaction,
resetTransactionsToCategorizeSelected,
enableMultipleCategorization,
],
);
const handleClose = () => {