Skip to content

Commit 92b84ee

Browse files
fix: don't clear input when allow manual input is true (#214)
1 parent 51809f6 commit 92b84ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/autocomplete/use-autocomplete.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ export const useAutocomplete = <I>({
102102
});
103103

104104
useEffect(() => {
105-
if (!focused) onText('');
106-
}, [focused]);
105+
if (!focused && !keepQuery) onText('');
106+
}, [focused, keepQuery]);
107107

108108
const meta = useMeta<Meta<I>>({
109109
onText,

0 commit comments

Comments
 (0)