Skip to content

Commit

Permalink
Merge pull request #34131 from mkhutornyi/fix-33125
Browse files Browse the repository at this point in the history
fix IOU - Amount is not preserved in Manual page when the amount is changed in confirmation page
  • Loading branch information
luacmartins authored Jan 24, 2024
2 parents a052156 + c5131b0 commit e931eae
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 @@ -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
Expand Down

0 comments on commit e931eae

Please sign in to comment.