mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add command handler for clearSearch
This commit is contained in:
parent
e0dd68dd15
commit
d4529ca281
1 changed files with 4 additions and 0 deletions
|
|
@ -198,6 +198,10 @@ export function SearchBox(props: SearchBoxProps): JSX.Element {
|
|||
if (action === 'focusSearchBar' && inputRef.current) {
|
||||
inputRef.current.select()
|
||||
}
|
||||
if (action == 'clearSearch' && inputRef.current) {
|
||||
setSearchTerm('')
|
||||
props.applySearchQuery('')
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue