Skip to content

Commit

Permalink
fix IOU - Amount is not preserved in Manual page when the amount is c…
Browse files Browse the repository at this point in the history
…hanged in confirmation page
  • Loading branch information
mkhutornyi committed Jan 9, 2024
1 parent a4bdebe commit c5131b0
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 c5131b0

Please sign in to comment.