diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx index b76ca99751afd..0b77dd4728e86 100755 --- a/src/components/MoneyRequestConfirmationList.tsx +++ b/src/components/MoneyRequestConfirmationList.tsx @@ -503,6 +503,7 @@ function MoneyRequestConfirmationList({ return; } IOU.setMoneyRequestCategory(transactionID, enabledCategories[0].name); + // Keep 'transaction' out to ensure that we autoselect the option only once // eslint-disable-next-line react-hooks/exhaustive-deps }, [shouldShowCategories, policyCategories, isCategoryRequired]); @@ -520,7 +521,9 @@ function MoneyRequestConfirmationList({ if (updatedTagsString !== TransactionUtils.getTag(transaction) && updatedTagsString) { IOU.setMoneyRequestTag(transactionID, updatedTagsString); } - }, [policyTagLists, transaction, transactionID, policyTags, canUseViolations]); + // Keep 'transaction' out to ensure that we autoselect the option only once + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [policyTagLists, policyTags, canUseViolations]); /** */