Skip to content

Commit b17f6aa

Browse files
authored
fix search input desync with debounced query (#2097)
1 parent db59aff commit b17f6aa

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

components/Search.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ export default function Search({ query, total }: Props) {
4343
}
4444
}, [isApple]);
4545

46-
useEffect(() => {
47-
if (inputRef?.current && !search) {
48-
inputRef.current.clear();
49-
}
50-
}, [search]);
51-
5246
const typingCallback = useDebouncedCallback((text: string) => {
5347
void replace(urlWithQuery('/', { ...query, search: text, offset: null }));
5448
}, 200);

0 commit comments

Comments
 (0)