-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Part 3c] Pass policyTags to getLastMessageTextForReport from getAlternateText and createOption #83545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Part 3c] Pass policyTags to getLastMessageTextForReport from getAlternateText and createOption #83545
Changes from all commits
8e24b0a
4660006
296a853
3f5ca7f
1bfaf9b
2835d0d
3c38717
68c2cba
f72957a
9f1f25c
365d749
a0334ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -177,6 +177,7 @@ function useSearchSelectorBase({ | |
| const currentUserAccountID = currentUserPersonalDetails.accountID; | ||
| const currentUserEmail = currentUserPersonalDetails.email ?? ''; | ||
| const personalDetails = usePersonalDetails(); | ||
| const [allPolicyTags] = useOnyx(ONYXKEYS.COLLECTION.POLICY_TAGS); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❌ PERF-11
Consider accessing the collection via a ref ( Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency. |
||
| const onListEndReached = useDebounce( | ||
| useCallback(() => { | ||
|
|
@@ -231,6 +232,7 @@ function useSearchSelectorBase({ | |
| personalDetails, | ||
| countryCode, | ||
| reportAttributesDerived: reportAttributesDerived?.reports, | ||
| allPolicyTags, | ||
| }); | ||
| case CONST.SEARCH_SELECTOR.SEARCH_CONTEXT_GENERAL: | ||
| return getValidOptions(optionsWithContacts, allPolicies, draftComments, nvpDismissedProductTraining, loginList, currentUserAccountID, currentUserEmail, { | ||
|
|
@@ -246,6 +248,7 @@ function useSearchSelectorBase({ | |
| personalDetails, | ||
| countryCode, | ||
| reportAttributesDerived: reportAttributesDerived?.reports, | ||
| allPolicyTags, | ||
| }); | ||
| case CONST.SEARCH_SELECTOR.SEARCH_CONTEXT_SHARE_DESTINATION: | ||
| return getValidOptions(optionsWithContacts, allPolicies, draftComments, nvpDismissedProductTraining, loginList, currentUserAccountID, currentUserEmail, { | ||
|
|
@@ -268,6 +271,7 @@ function useSearchSelectorBase({ | |
| personalDetails, | ||
| countryCode, | ||
| reportAttributesDerived: reportAttributesDerived?.reports, | ||
| allPolicyTags, | ||
| }); | ||
| case CONST.SEARCH_SELECTOR.SEARCH_CONTEXT_ATTENDEES: | ||
| return getValidOptions(optionsWithContacts, allPolicies, draftComments, nvpDismissedProductTraining, loginList, currentUserAccountID, currentUserEmail, { | ||
|
|
@@ -289,6 +293,7 @@ function useSearchSelectorBase({ | |
| personalDetails, | ||
| countryCode, | ||
| reportAttributesDerived: reportAttributesDerived?.reports, | ||
| allPolicyTags, | ||
| }); | ||
| default: | ||
| return getEmptyOptions(); | ||
|
|
@@ -319,6 +324,7 @@ function useSearchSelectorBase({ | |
| personalDetails, | ||
| reportAttributesDerived?.reports, | ||
| trimmedSearchInput, | ||
| allPolicyTags, | ||
| ]); | ||
|
|
||
| const isOptionSelected = useMemo(() => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How abouty using a selector here to narrow down the collection to just the ones matching the selectedReportIDs?