Skip to content

Commit

Permalink
Merge pull request Expensify#47985 from daledah/fix/47583
Browse files Browse the repository at this point in the history
fix: prevent email address selection for categorize
  • Loading branch information
thienlnam authored Sep 9, 2024
2 parents 14a38ec + e659799 commit 5bef7f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/iou/request/MoneyRequestParticipantsSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,15 @@ function MoneyRequestParticipantsSelector({participants = CONST.EMPTY_ARRAY, onF
}

const newOptions = OptionsListUtils.filterOptions(defaultOptions, debouncedSearchTerm, {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
canInviteUser: (canUseP2PDistanceRequests || iouRequestType !== CONST.IOU.REQUEST_TYPE.DISTANCE) && !isCategorizeOrShareAction,
selectedOptions: participants as Participant[],
excludeLogins: CONST.EXPENSIFY_EMAILS,
maxRecentReportsToShow: CONST.IOU.MAX_RECENT_REPORTS_TO_SHOW,
preferPolicyExpenseChat: isPaidGroupPolicy,
});
return newOptions;
}, [areOptionsInitialized, defaultOptions, debouncedSearchTerm, participants, isPaidGroupPolicy]);
}, [areOptionsInitialized, defaultOptions, debouncedSearchTerm, participants, isPaidGroupPolicy, canUseP2PDistanceRequests, iouRequestType, isCategorizeOrShareAction]);

/**
* Returns the sections needed for the OptionsSelector
Expand Down

0 comments on commit 5bef7f5

Please sign in to comment.