From 54f638d611a7b6e7587b6bfd4a2d0ffdcc683fd2 Mon Sep 17 00:00:00 2001 From: Zuzanna Furtak Date: Wed, 4 Feb 2026 16:20:21 +0100 Subject: [PATCH 1/4] Migrate SearchFiltersSelectors: Chats and Participants --- .../Search/SearchFiltersChatsSelector.tsx | 34 +++++++++-------- .../SearchFiltersParticipantsSelector.tsx | 37 +++++++++++-------- src/libs/OptionsListUtils/index.ts | 11 ++++-- src/libs/OptionsListUtils/types.ts | 11 +++++- src/pages/NewChatPage.tsx | 2 +- .../MoneyRequestAccountantSelector.tsx | 2 +- .../MoneyRequestParticipantsSelector.tsx | 2 +- 7 files changed, 59 insertions(+), 40 deletions(-) diff --git a/src/components/Search/SearchFiltersChatsSelector.tsx b/src/components/Search/SearchFiltersChatsSelector.tsx index f1f3505451900..88f146c8504b0 100644 --- a/src/components/Search/SearchFiltersChatsSelector.tsx +++ b/src/components/Search/SearchFiltersChatsSelector.tsx @@ -2,9 +2,8 @@ import reportsSelector from '@selectors/Attributes'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {usePersonalDetails} from '@components/OnyxListItemProvider'; import {useOptionsList} from '@components/OptionListContextProvider'; -// eslint-disable-next-line no-restricted-imports -import SelectionList from '@components/SelectionListWithSections'; -import InviteMemberListItem from '@components/SelectionListWithSections/InviteMemberListItem'; +import InviteMemberListItem from '@components/SelectionList/ListItem/InviteMemberListItem'; +import SelectionList from '@components/SelectionList/SelectionListWithSections'; import useArchivedReportsIdSet from '@hooks/useArchivedReportsIdSet'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useDebouncedState from '@hooks/useDebouncedState'; @@ -13,7 +12,8 @@ import useOnyx from '@hooks/useOnyx'; import useScreenWrapperTransitionStatus from '@hooks/useScreenWrapperTransitionStatus'; import {canUseTouchScreen} from '@libs/DeviceCapabilities'; import {createOptionFromReport, filterAndOrderOptions, formatSectionsFromSearchTerm, getAlternateText, getSearchOptions} from '@libs/OptionsListUtils'; -import type {Option, Section} from '@libs/OptionsListUtils'; +import type {Option} from '@libs/OptionsListUtils'; +import type {OptionWithKey, SelectionListSections} from '@libs/OptionsListUtils/types'; import type {OptionData} from '@libs/ReportUtils'; import Navigation from '@navigation/Navigation'; import {searchInServer} from '@userActions/Report'; @@ -101,7 +101,7 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen }, [defaultOptions, cleanSearchTerm, countryCode, loginList, selectedOptions, currentUserAccountID, currentUserEmail, personalDetails]); const {sections, headerMessage} = useMemo(() => { - const newSections: Section[] = []; + const newSections: SelectionListSections = []; if (!areOptionsInitialized) { return {sections: [], headerMessage: undefined}; } @@ -127,7 +127,7 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen newSections.push({ title: undefined, data: reportsFiltered, - shouldShow: chatOptions.recentReports.length > 0, + sectionIndex: 1, }); const areResultsFound = didScreenTransitionEnd && formattedResults.section.data.length === 0 && reportsFiltered.length === 0; @@ -156,7 +156,7 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen }, [debouncedSearchTerm]); const handleParticipantSelection = useCallback( - (selectedOption: Option) => { + (selectedOption: OptionWithKey) => { const optionReportID = selectedOption.reportID; if (!optionReportID) { return; @@ -197,23 +197,25 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen const isLoadingNewOptions = !!isSearchingForReports; const showLoadingPlaceholder = !didScreenTransitionEnd || !areOptionsInitialized || !initialReportIDs || !personalDetails; + const textInputOptions = { + value: searchTerm, + label: translate('selectionList.nameEmailOrPhoneNumber'), + onChangeText: setSearchTerm, + headerMessage, + }; + return ( { - setSearchTerm(value); - }} - onSelectRow={handleParticipantSelection} + textInputOptions={textInputOptions} isLoadingNewOptions={isLoadingNewOptions} showLoadingPlaceholder={showLoadingPlaceholder} + shouldShowTextInput /> ); } diff --git a/src/components/Search/SearchFiltersParticipantsSelector.tsx b/src/components/Search/SearchFiltersParticipantsSelector.tsx index e07d9662f90d7..92820b542f3bf 100644 --- a/src/components/Search/SearchFiltersParticipantsSelector.tsx +++ b/src/components/Search/SearchFiltersParticipantsSelector.tsx @@ -2,9 +2,8 @@ import reportsSelector from '@selectors/Attributes'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {usePersonalDetails} from '@components/OnyxListItemProvider'; import {useOptionsList} from '@components/OptionListContextProvider'; -// eslint-disable-next-line no-restricted-imports -import SelectionList from '@components/SelectionListWithSections'; -import UserSelectionListItem from '@components/SelectionListWithSections/Search/UserSelectionListItem'; +import UserSelectionListItem from '@components/SelectionList/ListItem/UserSelectionListItem'; +import SelectionList from '@components/SelectionList/SelectionListWithSections'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; @@ -12,7 +11,8 @@ import useScreenWrapperTransitionStatus from '@hooks/useScreenWrapperTransitionS import {canUseTouchScreen} from '@libs/DeviceCapabilities'; import memoize from '@libs/memoize'; import {filterAndOrderOptions, filterSelectedOptions, formatSectionsFromSearchTerm, getFilteredRecentAttendees, getValidOptions} from '@libs/OptionsListUtils'; -import type {Option, Section} from '@libs/OptionsListUtils'; +import type {Option} from '@libs/OptionsListUtils'; +import type {SelectionListSections} from '@libs/OptionsListUtils/types'; import type {OptionData} from '@libs/ReportUtils'; import {getDisplayNameForParticipant} from '@libs/ReportUtils'; import Navigation from '@navigation/Navigation'; @@ -193,7 +193,7 @@ function SearchFiltersParticipantsSelector({initialAccountIDs, onFiltersUpdate, }, [unselectedOptions, cleanSearchTerm, countryCode, loginList, selectedOptions, shouldAllowNameOnlyOptions, searchTerm, currentUserEmail, currentUserAccountID, personalDetails]); const {sections, headerMessage} = useMemo(() => { - const newSections: Section[] = []; + const newSections: SelectionListSections = []; if (!areOptionsInitialized) { return {sections: [], headerMessage: undefined}; } @@ -231,7 +231,7 @@ function SearchFiltersParticipantsSelector({initialAccountIDs, onFiltersUpdate, newSections.push({ title: '', data: [chatOptions.currentUserOption], - shouldShow: true, + sectionIndex: 0, }); } @@ -247,13 +247,13 @@ function SearchFiltersParticipantsSelector({initialAccountIDs, onFiltersUpdate, newSections.push({ title: '', data: filteredRecentReports, - shouldShow: filteredRecentReports.length > 0, + sectionIndex: 1, }); newSections.push({ title: '', data: chatOptions.personalDetails, - shouldShow: chatOptions.personalDetails.length > 0, + sectionIndex: 2, }); const noResultsFound = chatOptions.personalDetails.length === 0 && chatOptions.recentReports.length === 0 && !chatOptions.currentUserOption; @@ -406,23 +406,28 @@ function SearchFiltersParticipantsSelector({initialAccountIDs, onFiltersUpdate, const isLoadingNewOptions = !!isSearchingForReports; const showLoadingPlaceholder = !didScreenTransitionEnd || !areOptionsInitialized || !initialAccountIDs || !personalDetails; + const textInputOptions = useMemo( + () => ({ + value: searchTerm, + label: translate('selectionList.nameEmailOrPhoneNumber'), + onChangeText: setSearchTerm, + headerMessage, + }), + [searchTerm, translate, setSearchTerm, headerMessage], + ); + return ( { - setSearchTerm(value); - }} onSelectRow={handleParticipantSelection} isLoadingNewOptions={isLoadingNewOptions} showLoadingPlaceholder={showLoadingPlaceholder} + canSelectMultiple /> ); } diff --git a/src/libs/OptionsListUtils/index.ts b/src/libs/OptionsListUtils/index.ts index 37db6ad9d467e..4f7db4dd0f9d4 100644 --- a/src/libs/OptionsListUtils/index.ts +++ b/src/libs/OptionsListUtils/index.ts @@ -352,7 +352,7 @@ function isPersonalDetailsReady(personalDetails: OnyxEntry) /** * Get the participant option for a report. */ -function getParticipantsOption(participant: OptionData | Participant, personalDetails: OnyxEntry): Participant { +function getParticipantsOption(participant: OptionData | Participant, personalDetails: OnyxEntry): Participant & {keyForList: string} { const detail = participant.accountID ? getPersonalDetailsForAccountIDs([participant.accountID], personalDetails)[participant.accountID] : undefined; // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing const login = detail?.login || participant.login || ''; @@ -2599,6 +2599,7 @@ function getFilteredRecentAttendees( // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing login: attendee.email || attendee.displayName, ...getPersonalDetailByEmail(attendee.email), + keyForList: `${currentUserAccountID}`, })) .map((attendee) => getParticipantsOption(attendee, personalDetails)); @@ -2740,6 +2741,7 @@ function formatSectionsFromSearchTerm( return { section: { title: undefined, + sectionIndex: 0, data: shouldGetOptionDetails ? selectedOptions.map((participant) => { const isReportPolicyExpenseChat = participant.isPolicyExpenseChat ?? false; @@ -2748,7 +2750,6 @@ function formatSectionsFromSearchTerm( : getParticipantsOption(participant, personalDetails); }) : selectedOptions, - shouldShow: selectedOptions.length > 0, }, }; } @@ -2768,6 +2769,7 @@ function formatSectionsFromSearchTerm( return { section: { title: undefined, + sectionIndex: 0, data: shouldGetOptionDetails ? selectedParticipantsWithoutDetails.map((participant) => { const isReportPolicyExpenseChat = participant.isPolicyExpenseChat ?? false; @@ -2776,7 +2778,6 @@ function formatSectionsFromSearchTerm( : getParticipantsOption(participant, personalDetails); }) : selectedParticipantsWithoutDetails, - shouldShow: selectedParticipantsWithoutDetails.length > 0, }, }; } @@ -3130,7 +3131,9 @@ function getManagerMcTestParticipant(currentUserAccountID: number, personalDetai : getPersonalDetailByEmail(CONST.EMAIL.MANAGER_MCTEST); const managerMcTestReport = managerMcTestPersonalDetails?.accountID && currentUserAccountID ? getChatByParticipants([managerMcTestPersonalDetails?.accountID, currentUserAccountID]) : undefined; - return managerMcTestPersonalDetails ? {...getParticipantsOption(managerMcTestPersonalDetails, allPersonalDetails), reportID: managerMcTestReport?.reportID} : undefined; + return managerMcTestPersonalDetails + ? {...getParticipantsOption({...managerMcTestPersonalDetails, keyForList: `${managerMcTestPersonalDetails?.accountID}`}, allPersonalDetails), reportID: managerMcTestReport?.reportID} + : undefined; } function shallowOptionsListCompare(a: OptionList, b: OptionList): boolean { diff --git a/src/libs/OptionsListUtils/types.ts b/src/libs/OptionsListUtils/types.ts index 35504d8dcdf93..678bf92d813c2 100644 --- a/src/libs/OptionsListUtils/types.ts +++ b/src/libs/OptionsListUtils/types.ts @@ -1,4 +1,5 @@ import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; +import type {Section as SelectionListSection} from '@components/SelectionList/SelectionListWithSections/types'; import type {OptionData} from '@libs/ReportUtils'; import type {AvatarSource} from '@libs/UserAvatarUtils'; import type {IOUAction} from '@src/CONST'; @@ -92,6 +93,10 @@ type OptionList = { type Option = Partial; +type OptionWithKey = Option & { + keyForList: string; +}; + /** * A narrowed version of `Option` is used when we have a guarantee that given values exist. */ @@ -234,9 +239,11 @@ type MemberForList = { }; type SectionForSearchTerm = { - section: Section; + section: SelectionListSection; }; +type SelectionListSections = Array>; + type Options = { recentReports: SearchOptionData[]; personalDetails: SearchOptionData[]; @@ -288,6 +295,7 @@ export type { GetValidReportsConfig, MemberForList, Option, + OptionWithKey, OptionList, OptionTree, Options, @@ -300,6 +308,7 @@ export type { SearchOptionData, Section, SectionBase, + SelectionListSections, SectionForSearchTerm, IsValidReportsConfig, }; diff --git a/src/pages/NewChatPage.tsx b/src/pages/NewChatPage.tsx index 0a9dddf075c73..193c31b99cc26 100755 --- a/src/pages/NewChatPage.tsx +++ b/src/pages/NewChatPage.tsx @@ -277,7 +277,7 @@ function NewChatPage({ref}: NewChatPageProps) { undefined, reportAttributesDerived, ); - sections.push(formatResults.section); + sections.push({...formatResults.section, title: undefined, shouldShow: true}); if (!firstKeyForList) { firstKeyForList = getFirstKeyForList(formatResults.section.data); diff --git a/src/pages/iou/request/MoneyRequestAccountantSelector.tsx b/src/pages/iou/request/MoneyRequestAccountantSelector.tsx index 4970c927c1eff..56431f8216e4c 100644 --- a/src/pages/iou/request/MoneyRequestAccountantSelector.tsx +++ b/src/pages/iou/request/MoneyRequestAccountantSelector.tsx @@ -164,7 +164,7 @@ function MoneyRequestAccountantSelector({onFinish, onAccountantSelected, iouType undefined, reportAttributesDerived, ); - newSections.push(formatResults.section); + newSections.push({...formatResults.section, title: undefined, shouldShow: true}); newSections.push({ title: translate('common.recents'), diff --git a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx index b7c97e731c115..eedcf0d376e36 100644 --- a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx +++ b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx @@ -298,7 +298,7 @@ function MoneyRequestParticipantsSelector({ reportAttributesDerived, ); - newSections.push(formatResults.section); + newSections.push({...formatResults.section, title: undefined, shouldShow: true}); newSections.push({ title: translate('workspace.common.workspace'), From b615d586db50cc26d70bd24a0d84ce6bf8d83834 Mon Sep 17 00:00:00 2001 From: Zuzanna Furtak Date: Wed, 4 Feb 2026 16:55:07 +0100 Subject: [PATCH 2/4] Remove manual memoization from SearchFiltersChatsSelector --- .../Search/SearchFiltersChatsSelector.tsx | 159 +++++++----------- 1 file changed, 63 insertions(+), 96 deletions(-) diff --git a/src/components/Search/SearchFiltersChatsSelector.tsx b/src/components/Search/SearchFiltersChatsSelector.tsx index 88f146c8504b0..7542de147a51b 100644 --- a/src/components/Search/SearchFiltersChatsSelector.tsx +++ b/src/components/Search/SearchFiltersChatsSelector.tsx @@ -1,5 +1,5 @@ import reportsSelector from '@selectors/Attributes'; -import React, {useCallback, useEffect, useMemo, useState} from 'react'; +import React, {useEffect, useState} from 'react'; import {usePersonalDetails} from '@components/OnyxListItemProvider'; import {useOptionsList} from '@components/OptionListContextProvider'; import InviteMemberListItem from '@components/SelectionList/ListItem/InviteMemberListItem'; @@ -59,53 +59,44 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen const [reportAttributesDerived] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {canBeMissing: true, selector: reportsSelector}); const [selectedReportIDs, setSelectedReportIDs] = useState(initialReportIDs); const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState(''); - const cleanSearchTerm = useMemo(() => searchTerm.trim().toLowerCase(), [searchTerm]); + const cleanSearchTerm = searchTerm.trim().toLowerCase(); const [draftComments] = useOnyx(ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT, {canBeMissing: true}); const archivedReportsIdSet = useArchivedReportsIdSet(); const [nvpDismissedProductTraining] = useOnyx(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING, {canBeMissing: true}); - const selectedOptions = useMemo(() => { - return selectedReportIDs.map((id) => { - const report = getSelectedOptionData( - createOptionFromReport({...reports?.[`${ONYXKEYS.COLLECTION.REPORT}${id}`], reportID: id}, personalDetails, currentUserAccountID, reportAttributesDerived), - ); - const isReportArchived = archivedReportsIdSet.has(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report.reportID}`); - const alternateText = getAlternateText(report, {}, isReportArchived, currentUserAccountID, {}); - return {...report, alternateText}; - }); - }, [archivedReportsIdSet, personalDetails, reportAttributesDerived, reports, selectedReportIDs, currentUserAccountID]); - - const defaultOptions = useMemo(() => { - if (!areOptionsInitialized || !isScreenTransitionEnd) { - return defaultListOptions; - } - return getSearchOptions({ - options, - draftComments, - nvpDismissedProductTraining, - betas: undefined, - isUsedInChatFinder: false, - countryCode, - loginList, - currentUserAccountID, - currentUserEmail, - personalDetails, - }); - }, [areOptionsInitialized, isScreenTransitionEnd, options, draftComments, nvpDismissedProductTraining, countryCode, loginList, currentUserAccountID, currentUserEmail, personalDetails]); + const selectedOptions: OptionData[] = selectedReportIDs.map((id) => { + const report = getSelectedOptionData( + createOptionFromReport({...reports?.[`${ONYXKEYS.COLLECTION.REPORT}${id}`], reportID: id}, personalDetails, currentUserAccountID, reportAttributesDerived), + ); + const isReportArchived = archivedReportsIdSet.has(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report.reportID}`); + const alternateText = getAlternateText(report, {}, isReportArchived, currentUserAccountID, {}); + return {...report, alternateText}; + }); - const chatOptions = useMemo(() => { - return filterAndOrderOptions(defaultOptions, cleanSearchTerm, countryCode, loginList, currentUserEmail, currentUserAccountID, personalDetails, { - selectedOptions, - excludeLogins: CONST.EXPENSIFY_EMAILS_OBJECT, - }); - }, [defaultOptions, cleanSearchTerm, countryCode, loginList, selectedOptions, currentUserAccountID, currentUserEmail, personalDetails]); + const defaultOptions = + !areOptionsInitialized || !isScreenTransitionEnd + ? defaultListOptions + : getSearchOptions({ + options, + draftComments, + nvpDismissedProductTraining, + betas: undefined, + isUsedInChatFinder: false, + countryCode, + loginList, + currentUserAccountID, + currentUserEmail, + personalDetails, + }); + + const chatOptions = filterAndOrderOptions(defaultOptions, cleanSearchTerm, countryCode, loginList, currentUserEmail, currentUserAccountID, personalDetails, { + selectedOptions, + excludeLogins: CONST.EXPENSIFY_EMAILS_OBJECT, + }); - const {sections, headerMessage} = useMemo(() => { - const newSections: SelectionListSections = []; - if (!areOptionsInitialized) { - return {sections: [], headerMessage: undefined}; - } + const sections: SelectionListSections = []; + if (areOptionsInitialized) { const formattedResults = formatSectionsFromSearchTerm( cleanSearchTerm, selectedOptions, @@ -118,80 +109,56 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen reportAttributesDerived, ); - newSections.push(formattedResults.section); + sections.push(formattedResults.section); const visibleReportsWhenSearchTermNonEmpty = chatOptions.recentReports.map((report) => (selectedReportIDs.includes(report.reportID) ? getSelectedOptionData(report) : report)); const visibleReportsWhenSearchTermEmpty = chatOptions.recentReports.filter((report) => !selectedReportIDs.includes(report.reportID)); const reportsFiltered = cleanSearchTerm === '' ? visibleReportsWhenSearchTermEmpty : visibleReportsWhenSearchTermNonEmpty; - newSections.push({ + sections.push({ title: undefined, data: reportsFiltered, sectionIndex: 1, }); - - const areResultsFound = didScreenTransitionEnd && formattedResults.section.data.length === 0 && reportsFiltered.length === 0; - const message = areResultsFound ? translate('common.noResultsFound') : undefined; - - return { - sections: newSections, - headerMessage: message, - }; - }, [ - areOptionsInitialized, - chatOptions.personalDetails, - chatOptions.recentReports, - cleanSearchTerm, - didScreenTransitionEnd, - personalDetails, - reportAttributesDerived, - selectedOptions, - selectedReportIDs, - translate, - currentUserAccountID, - ]); + } + const noResultsFound = didScreenTransitionEnd && sections.at(0)?.data.length === 0 && sections.at(1)?.data.length === 0; + const headerMessage = noResultsFound ? translate('common.noResultsFound') : undefined; useEffect(() => { searchInServer(debouncedSearchTerm.trim()); }, [debouncedSearchTerm]); - const handleParticipantSelection = useCallback( - (selectedOption: OptionWithKey) => { - const optionReportID = selectedOption.reportID; - if (!optionReportID) { - return; - } - const foundOptionIndex = selectedReportIDs.findIndex((reportID: string) => { - return reportID && reportID !== '' && selectedOption.reportID === reportID; - }); - - if (foundOptionIndex < 0) { - setSelectedReportIDs([...selectedReportIDs, optionReportID]); - } else { - const newSelectedReports = [...selectedReportIDs.slice(0, foundOptionIndex), ...selectedReportIDs.slice(foundOptionIndex + 1)]; - setSelectedReportIDs(newSelectedReports); - } - }, - [selectedReportIDs], - ); + const handleParticipantSelection = (selectedOption: OptionWithKey) => { + const optionReportID = selectedOption.reportID; + if (!optionReportID) { + return; + } + const foundOptionIndex = selectedReportIDs.findIndex((reportID: string) => { + return reportID && reportID !== '' && selectedOption.reportID === reportID; + }); + + if (foundOptionIndex < 0) { + setSelectedReportIDs([...selectedReportIDs, optionReportID]); + } else { + const newSelectedReports = [...selectedReportIDs.slice(0, foundOptionIndex), ...selectedReportIDs.slice(foundOptionIndex + 1)]; + setSelectedReportIDs(newSelectedReports); + } + }; - const applyChanges = useCallback(() => { + const applyChanges = () => { onFiltersUpdate(selectedReportIDs); Navigation.goBack(ROUTES.SEARCH_ADVANCED_FILTERS.getRoute()); - }, [onFiltersUpdate, selectedReportIDs]); + }; - const resetChanges = useCallback(() => { + const resetChanges = () => { setSelectedReportIDs([]); - }, []); - - const footerContent = useMemo( - () => ( - - ), - [resetChanges, applyChanges], + }; + + const footerContent = ( + ); const isLoadingNewOptions = !!isSearchingForReports; From 468b6e88e64d3c8c0a08b723a46ad8b185c01734 Mon Sep 17 00:00:00 2001 From: Zuzanna Furtak Date: Thu, 5 Feb 2026 09:49:06 +0100 Subject: [PATCH 3/4] Change import name --- src/components/Search/SearchFiltersChatsSelector.tsx | 4 ++-- src/components/Search/SearchFiltersParticipantsSelector.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Search/SearchFiltersChatsSelector.tsx b/src/components/Search/SearchFiltersChatsSelector.tsx index 7542de147a51b..78749f51c22b5 100644 --- a/src/components/Search/SearchFiltersChatsSelector.tsx +++ b/src/components/Search/SearchFiltersChatsSelector.tsx @@ -3,7 +3,7 @@ import React, {useEffect, useState} from 'react'; import {usePersonalDetails} from '@components/OnyxListItemProvider'; import {useOptionsList} from '@components/OptionListContextProvider'; import InviteMemberListItem from '@components/SelectionList/ListItem/InviteMemberListItem'; -import SelectionList from '@components/SelectionList/SelectionListWithSections'; +import SelectionListWithSections from '@components/SelectionList/SelectionListWithSections'; import useArchivedReportsIdSet from '@hooks/useArchivedReportsIdSet'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useDebouncedState from '@hooks/useDebouncedState'; @@ -172,7 +172,7 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen }; return ( - Date: Thu, 5 Feb 2026 21:24:39 +0100 Subject: [PATCH 4/4] Adjust to review --- src/pages/NewChatPage.tsx | 2 ++ src/pages/iou/request/MoneyRequestAccountantSelector.tsx | 2 ++ src/pages/iou/request/MoneyRequestParticipantsSelector.tsx | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/NewChatPage.tsx b/src/pages/NewChatPage.tsx index 193c31b99cc26..4d0b3c00bc77f 100755 --- a/src/pages/NewChatPage.tsx +++ b/src/pages/NewChatPage.tsx @@ -277,6 +277,8 @@ function NewChatPage({ref}: NewChatPageProps) { undefined, reportAttributesDerived, ); + // Just a temporary fix to satisfy the type checker + // Will be fixed when migrating to use new SelectionListWithSections sections.push({...formatResults.section, title: undefined, shouldShow: true}); if (!firstKeyForList) { diff --git a/src/pages/iou/request/MoneyRequestAccountantSelector.tsx b/src/pages/iou/request/MoneyRequestAccountantSelector.tsx index 56431f8216e4c..4bd11762780e4 100644 --- a/src/pages/iou/request/MoneyRequestAccountantSelector.tsx +++ b/src/pages/iou/request/MoneyRequestAccountantSelector.tsx @@ -164,6 +164,8 @@ function MoneyRequestAccountantSelector({onFinish, onAccountantSelected, iouType undefined, reportAttributesDerived, ); + // Just a temporary fix to satisfy the type checker + // Will be fixed when migrating to use new SelectionListWithSections newSections.push({...formatResults.section, title: undefined, shouldShow: true}); newSections.push({ diff --git a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx index eedcf0d376e36..808b0af2e6c3b 100644 --- a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx +++ b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx @@ -297,7 +297,8 @@ function MoneyRequestParticipantsSelector({ undefined, reportAttributesDerived, ); - + // Just a temporary fix to satisfy the type checker + // Will be fixed when migrating to use new SelectionListWithSections newSections.push({...formatResults.section, title: undefined, shouldShow: true}); newSections.push({