From 87d58066dc329f45e7dd4277f1a9f411c77bd742 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Mon, 15 Apr 2024 01:37:58 +0530 Subject: [PATCH] fix: Web - Inconsistent behavior of tag disappearing and reappearing when requesting money. Signed-off-by: Krishna Gupta --- .../MoneyTemporaryForRefactorRequestConfirmationList.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/MoneyTemporaryForRefactorRequestConfirmationList.tsx b/src/components/MoneyTemporaryForRefactorRequestConfirmationList.tsx index 21815f00253b..62fd1321e35b 100755 --- a/src/components/MoneyTemporaryForRefactorRequestConfirmationList.tsx +++ b/src/components/MoneyTemporaryForRefactorRequestConfirmationList.tsx @@ -474,7 +474,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(() => { @@ -490,7 +491,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]); /** */