Skip to content

Commit

Permalink
Merge pull request #40217 from Krishna2323/krishna2323/issue/38744
Browse files Browse the repository at this point in the history
fix: Web - Inconsistent behavior of tag disappearing and reappearing when requesting money.
  • Loading branch information
amyevans authored Apr 16, 2024
2 parents 08efe3b + 87d5806 commit 87feaa5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ function MoneyTemporaryForRefactorRequestConfirmationList({
return;
}
IOU.setMoneyRequestCategory(transaction?.transactionID ?? '', enabledCategories[0].name);
}, [iouCategory, shouldShowCategories, policyCategories, transaction, isCategoryRequired]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [shouldShowCategories, policyCategories, isCategoryRequired]);

// Auto select the tag if there is only one enabled tag and it is required
useEffect(() => {
Expand All @@ -494,7 +495,8 @@ function MoneyTemporaryForRefactorRequestConfirmationList({
if (updatedTagsString !== TransactionUtils.getTag(transaction) && updatedTagsString) {
IOU.setMoneyRequestTag(transaction?.transactionID ?? '', updatedTagsString);
}
}, [policyTagLists, transaction, policyTags, canUseViolations]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [policyTagLists, policyTags, canUseViolations]);

/**
*/
Expand Down

0 comments on commit 87feaa5

Please sign in to comment.