fix: reset selected index on input change
This commit is contained in:
parent
5ef08b933e
commit
ac007acbd7
1 changed files with 1 additions and 0 deletions
|
|
@ -66,6 +66,7 @@ const SearchBar = forwardRef<
|
||||||
if (!input) {
|
if (!input) {
|
||||||
onSearch(null)
|
onSearch(null)
|
||||||
}
|
}
|
||||||
|
setSelectedIndex(-1)
|
||||||
}, [input])
|
}, [input])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue