Skip to content
Snippets Groups Projects
Commit 7a169301 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[dome] fix blur on search popup

parent 4ab666c3
No related branches found
No related tags found
No related merge requests found
...@@ -257,11 +257,11 @@ export function SearchField<A = undefined>(props: SearchFieldProps<A>) { ...@@ -257,11 +257,11 @@ export function SearchField<A = undefined>(props: SearchFieldProps<A>) {
); );
// Blur Event // Blur Event
const onBlur = debounce(() => { const onBlur = () => {
setValue(''); setValue('');
setIndex(-1); setIndex(-1);
if (onSearch) onSearch(''); if (onSearch) onSearch('');
}, 50); };
// Key Events // Key Events
const onKey = (evt: React.KeyboardEvent) => { const onKey = (evt: React.KeyboardEvent) => {
...@@ -308,7 +308,10 @@ export function SearchField<A = undefined>(props: SearchFieldProps<A>) { ...@@ -308,7 +308,10 @@ export function SearchField<A = undefined>(props: SearchFieldProps<A>) {
icon={h.icon} icon={h.icon}
title={h.title} title={h.title}
className={className} className={className}
onClick={() => { if (onHint) onHint(h); }} onClick={() => {
if (onHint) onHint(h);
blur();
}}
> >
{h.label} {h.label}
</Label> </Label>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment