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 }; };