mirror of
https://github.com/fergalmoran/turnstone.git
synced 2025-12-22 09:49:56 +00:00
Fix bug preventing clear button from working
This commit is contained in:
@@ -164,14 +164,13 @@ export default function Container(props) {
|
||||
}
|
||||
|
||||
const handleClearButton = (evt) => {
|
||||
console.log('handleClearButton')
|
||||
evt.preventDefault()
|
||||
clearState()
|
||||
}
|
||||
|
||||
const clearState = () => {
|
||||
dispatch(setQuery(queryInput.current.value))
|
||||
setTimeout(() => queryInput.current.focus(), debounceWait) // TODO: Put in useEffect
|
||||
dispatch(setQuery(''))
|
||||
queryInput.current.focus()
|
||||
}
|
||||
|
||||
const handleFocus = () => {
|
||||
|
||||
Reference in New Issue
Block a user