Skip to content

Commit 4fd0ba8

Browse files
committed
fix bug on main
1 parent dd58318 commit 4fd0ba8

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/components/Search/SearchAutocompleteInput.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,6 @@ function SearchAutocompleteInput(
135135
return focusedSharedValue.get() ? wrapperFocusedStyle : wrapperStyle ?? {};
136136
});
137137

138-
const [localValue, setLocalValue] = useState(value);
139-
140-
const debouncedOnSearchQueryChange = useMemo(() => lodashDebounce(onSearchQueryChange, CONST.TIMING.USE_DEBOUNCED_STATE_DELAY), [onSearchQueryChange]);
141-
142-
const handleChangeText = useCallback(
143-
(text: string) => {
144-
setLocalValue(text);
145-
debouncedOnSearchQueryChange(text);
146-
},
147-
[debouncedOnSearchQueryChange],
148-
);
149-
150138
useEffect(() => {
151139
runOnLiveMarkdownRuntime(() => {
152140
'worklet';
@@ -206,8 +194,8 @@ function SearchAutocompleteInput(
206194
>
207195
<TextInput
208196
testID="search-autocomplete-text-input"
209-
value={localValue}
210-
onChangeText={handleChangeText}
197+
value={value}
198+
onChangeText={onSearchQueryChange}
211199
autoFocus={autoFocus}
212200
shouldDelayFocus={shouldDelayFocus}
213201
caretHidden={caretHidden}

0 commit comments

Comments
 (0)