From c5131b01eb4740ad0663ea2c28ab3929613bbba2 Mon Sep 17 00:00:00 2001 From: mkhutornyi Date: Tue, 9 Jan 2024 10:57:05 +0100 Subject: [PATCH] fix IOU - Amount is not preserved in Manual page when the amount is changed in confirmation page --- src/pages/iou/steps/MoneyRequestAmountForm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/steps/MoneyRequestAmountForm.js b/src/pages/iou/steps/MoneyRequestAmountForm.js index 536944f4a2d8..8775562d4476 100644 --- a/src/pages/iou/steps/MoneyRequestAmountForm.js +++ b/src/pages/iou/steps/MoneyRequestAmountForm.js @@ -132,9 +132,9 @@ function MoneyRequestAmountForm({amount, taxAmount, currency, isEditing, forward return; } initializeAmount(amount); - // we want to re-initialize the state only when the selected tab changes + // we want to re-initialize the state only when the selected tab or amount changes // eslint-disable-next-line react-hooks/exhaustive-deps - }, [selectedTab]); + }, [selectedTab, amount]); /** * Sets the selection and the amount accordingly to the value passed to the input