Skip to content

Commit e12e064

Browse files
committed
fix(autocomplete): fix value not getting clean when reseting the form
1 parent 95672b1 commit e12e064

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/AutocompleteController.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ export const AutocompleteController = <
109109

110110
if (optionFound) {
111111
setSelectedValue(optionFound as AutocompleteValue<Value, Multiple, DisableClearable, FreeSolo> | null);
112-
onChange(optionValueAccessor(optionFound));
112+
// onChange(optionValueAccessor(optionFound));
113113
}
114+
} else {
115+
setSelectedValue(null);
114116
}
115117
}, [formValue, optionValueAccessor, options, onChange]);
116118

0 commit comments

Comments
 (0)