Skip to content

Commit

Permalink
Merge pull request #32884 from Expensify/cmartins-fixAmountReset
Browse files Browse the repository at this point in the history
(cherry picked from commit 4239252)
  • Loading branch information
luacmartins authored and OSBotify committed Dec 12, 2023
1 parent 48e201c commit 5dc3e70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/iou/steps/MoneyRequestAmountForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5dc3e70

Please sign in to comment.