Skip to content

Commit

Permalink
update all occurencies of OptionsSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
TMisiukiewicz committed Dec 15, 2023
1 parent 7ccef7e commit 770a525
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/components/CategoryPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ function CategoryPicker({selectedCategory, policyCategories, policyRecentlyUsedC
sectionHeaderStyle={styles.mt5}
sections={sections}
selectedOptions={selectedOptions}
value={searchValue}
// Focus the first option when searching
focusedIndex={0}
// Focus the selected option on first load
Expand Down
1 change: 0 additions & 1 deletion src/components/TagPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ function TagPicker({selectedTag, tag, policyTags, policyRecentlyUsedTags, should
highlightSelectedOptions
isRowMultilineSupported
shouldShowTextInput={shouldShowTextInput}
value={searchValue}
// Focus the first option when searching
focusedIndex={0}
// Focus the selected option on first load
Expand Down
1 change: 0 additions & 1 deletion src/pages/NewChatPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ function NewChatPage({betas, isGroupChat, personalDetails, reports, translate, i
onAddToSelection={(option) => toggleOption(option)}
sections={sections}
selectedOptions={selectedOptions}
value={searchTerm}
onSelectRow={(option) => createChat(option)}
onChangeText={setSearchTermAndSearchInServer}
headerMessage={headerMessage}
Expand Down
10 changes: 2 additions & 8 deletions src/pages/tasks/TaskAssigneeSelectorModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
import React, {useCallback, useEffect, useMemo, useState} from 'react';
import {View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import {usePersonalDetails} from '@components/OnyxProvider';
Expand Down Expand Up @@ -112,12 +111,8 @@ function TaskAssigneeSelectorModal(props) {
}, [props, searchValue, allPersonalDetails, isLoading]);

useEffect(() => {
const debouncedSearch = _.debounce(updateOptions, 200);
debouncedSearch();
return () => {
debouncedSearch.cancel();
};
}, [updateOptions]);
updateOptions();
}, [searchValue, updateOptions]);

const onChangeText = (newSearchTerm = '') => {
setSearchValue(newSearchTerm);
Expand Down Expand Up @@ -221,7 +216,6 @@ function TaskAssigneeSelectorModal(props) {
<View style={[styles.flex1, styles.w100, styles.pRelative]}>
<OptionsSelector
sections={sections}
value={searchValue}
onSelectRow={selectReport}
onChangeText={onChangeText}
headerMessage={headerMessage}
Expand Down
1 change: 0 additions & 1 deletion src/pages/tasks/TaskShareDestinationSelectorModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ function TaskShareDestinationSelectorModal(props) {
<View style={[styles.flex1, styles.w100, styles.pRelative]}>
<OptionsSelector
sections={sections}
value={searchValue}
onSelectRow={selectReport}
onChangeText={setSearchTermAndSearchInServer}
headerMessage={headerMessage}
Expand Down

0 comments on commit 770a525

Please sign in to comment.