Skip to content

Commit ede08c8

Browse files
BeamanatorOSBotify
authored andcommitted
Merge pull request #51702 from Expensify/bondy-remove-debounce
[CP stg] Report Participant Page - remove debounce to allow member search (cherry picked from commit a739661) (CP triggered by grgia)
1 parent 9772272 commit ede08c8

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/pages/ReportParticipantsPage.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import TableListItem from '@components/SelectionList/TableListItem';
1818
import type {ListItem, SelectionListHandle} from '@components/SelectionList/types';
1919
import SelectionListWithModal from '@components/SelectionListWithModal';
2020
import Text from '@components/Text';
21-
import useDebouncedState from '@hooks/useDebouncedState';
2221
import useLocalize from '@hooks/useLocalize';
2322
import useMobileSelectionMode from '@hooks/useMobileSelectionMode';
2423
import useNetwork from '@hooks/useNetwork';
@@ -67,18 +66,7 @@ function ReportParticipantsPage({report, route}: ReportParticipantsPageProps) {
6766
const isFocused = useIsFocused();
6867
const {isOffline} = useNetwork();
6968
const canSelectMultiple = isGroupChat && isCurrentUserAdmin && (isSmallScreenWidth ? selectionMode?.isEnabled : true);
70-
const [searchValue, debouncedSearchValue, setSearchValue] = useDebouncedState('');
71-
72-
useEffect(
73-
() => () => {
74-
UserSearchPhraseActions.clearUserSearchPhrase();
75-
},
76-
[],
77-
);
78-
79-
useEffect(() => {
80-
UserSearchPhraseActions.updateUserSearchPhrase(debouncedSearchValue);
81-
}, [debouncedSearchValue]);
69+
const [searchValue, setSearchValue] = useState('');
8270

8371
useEffect(() => {
8472
if (isFocused) {
@@ -424,9 +412,7 @@ function ReportParticipantsPage({report, route}: ReportParticipantsPageProps) {
424412
shouldShowTextInput={shouldShowTextInput}
425413
textInputLabel={translate('selectionList.findMember')}
426414
textInputValue={searchValue}
427-
onChangeText={(value) => {
428-
setSearchValue(value);
429-
}}
415+
onChangeText={setSearchValue}
430416
headerMessage={headerMessage}
431417
ListItem={TableListItem}
432418
onSelectRow={openMemberDetails}

0 commit comments

Comments
 (0)