From 64e5f3612afcd966397fd446c59f9813ceb0b962 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 11 Dec 2023 17:11:51 -0700 Subject: [PATCH] gix amount reset --- 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 b4ae00b8e665..6317fd09aa82 100644 --- a/src/pages/iou/steps/MoneyRequestAmountForm.js +++ b/src/pages/iou/steps/MoneyRequestAmountForm.js @@ -123,9 +123,9 @@ function MoneyRequestAmountForm({amount, currency, isEditing, forwardedRef, onCu return; } initializeAmount(amount); - // we want to update the state only when the amount is changed + // we want to re-initialize the state only when the selected tab changes // eslint-disable-next-line react-hooks/exhaustive-deps - }, [amount]); + }, [selectedTab]); /** * Sets the selection and the amount accordingly to the value passed to the input