mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Blur on search when escape
This commit is contained in:
parent
bff847a5a2
commit
2ba89256d2
1 changed files with 6 additions and 0 deletions
|
|
@ -266,6 +266,12 @@ export function SearchBox(props: SearchBoxProps): JSX.Element {
|
|||
onChange={(event) => {
|
||||
setSearchTerm(event.target.value)
|
||||
}}
|
||||
onKeyDown={(event) => {
|
||||
const key = event.key.toLowerCase()
|
||||
if (key == 'escape') {
|
||||
event.currentTarget.blur()
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</form>
|
||||
{searchTerm && searchTerm.length ? (
|
||||
|
|
|
|||
Loading…
Reference in a new issue