From 206566fc483f2f5fc933b1852a723a1abb681555 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Tue, 23 Feb 2021 18:43:07 +0100 Subject: [PATCH] update side effect --- .../components/overview/kuery_bar/typeahead/use_kql_syntax.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/uptime/public/components/overview/kuery_bar/typeahead/use_kql_syntax.ts b/x-pack/plugins/uptime/public/components/overview/kuery_bar/typeahead/use_kql_syntax.ts index 66c17ca3c82988..2c945c33b9dc7b 100644 --- a/x-pack/plugins/uptime/public/components/overview/kuery_bar/typeahead/use_kql_syntax.ts +++ b/x-pack/plugins/uptime/public/components/overview/kuery_bar/typeahead/use_kql_syntax.ts @@ -49,7 +49,8 @@ export const useKqlSyntax = ({ setValue }: Props) => { useEffect(() => { localStorage.setItem(KQL_SYNTAX_LOCAL_STORAGE, String(kqlSyntax)); - }, [kqlSyntax]); + setValue(''); + }, [kqlSyntax, setValue]); return { kqlSyntax, setKqlSyntax }; };