From 1ba3a88780365e179aa73042255bd0e78b7672c0 Mon Sep 17 00:00:00 2001 From: Nathaniel Parke Date: Fri, 6 Nov 2020 18:06:52 +0800 Subject: [PATCH] Fix onBlur bug --- src/components/AppSearch.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/AppSearch.tsx b/src/components/AppSearch.tsx index 76ef436..7ba2bed 100644 --- a/src/components/AppSearch.tsx +++ b/src/components/AppSearch.tsx @@ -65,7 +65,10 @@ export default function AppSearch(props) { onClear={handleClear} onSelect={handleSelect} onFocus={props.onFocus} - onBlur={() => props.onBlur() && handleClear()} + onBlur={() => { + props.onBlur(); + handleClear(); + }} notFoundContent={null} // todo: make this search history style={{ width: props.width || '300px',