Skip to content

Commit

Permalink
fix(Assistant): SearchProvider wasn't emptied when emptying search input
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Oct 21, 2024
1 parent bba351b commit 545aa3d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/assistant/Search/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import SearchBarDesktop from './SearchBarDesktop'
const SearchBar = () => {
const { isMobile } = useBreakpoints()
const [inputValue, setInputValue] = useState('')
const { setSearchValue, clearSearch, delayedSetSearchValue } = useSearch()
const { clearSearch, delayedSetSearchValue } = useSearch()
const { onAssistantExecute } = useAssistant()
const navigate = useNavigate()

Expand All @@ -38,11 +38,7 @@ const SearchBar = () => {
}

const handleChange = ev => {
if (ev.target.value === '') {
setSearchValue(ev.target.value)
} else {
delayedSetSearchValue(ev.target.value)
}
delayedSetSearchValue(ev.target.value)
setInputValue(ev.target.value)
}

Expand Down

0 comments on commit 545aa3d

Please sign in to comment.