Skip to content

Commit 3004f4b

Browse files
committed
fix(FormAutocomplete): clear search value onBlur if no option was selected
1 parent 43e982b commit 3004f4b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/forms/FormAutocomplete.jsx

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ export function FormAutocomplete({
5252
}
5353
}}
5454
onBlur={() => {
55+
if (!getValue()) {
56+
setSearchValue('');
57+
}
58+
5559
if (ignoreBlur) {
5660
inputRef.current.focus();
5761
} else {

0 commit comments

Comments
 (0)