From 86c81d340a1b0761f2e8e134cc63b403175f14a8 Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Tue, 17 Sep 2024 08:49:08 +0200 Subject: [PATCH] Close the popover when a child is clio --- .../public/query_string_input/esql_menu_popover.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/unified_search/public/query_string_input/esql_menu_popover.tsx b/src/plugins/unified_search/public/query_string_input/esql_menu_popover.tsx index 1c04bbd84c7fa..d684448670c42 100644 --- a/src/plugins/unified_search/public/query_string_input/esql_menu_popover.tsx +++ b/src/plugins/unified_search/public/query_string_input/esql_menu_popover.tsx @@ -31,6 +31,7 @@ export const ESQLMenuPopover = () => { const toggleLanguageComponent = useCallback(async () => { setIsLanguageComponentOpen(!isLanguageComponentOpen); + setIsESQLMenuPopoverOpen(false); }, [isLanguageComponentOpen]); const esqlPanelItems = useMemo(() => { @@ -52,6 +53,7 @@ export const ESQLMenuPopover = () => { data-test-subj="esql-about" target="_blank" href={docLinks.links.query.queryESQL} + onClick={() => setIsESQLMenuPopoverOpen(false)} > {i18n.translate('unifiedSearch.query.queryBar.esqlMenu.documentation', { defaultMessage: 'Documentation', @@ -63,6 +65,7 @@ export const ESQLMenuPopover = () => { data-test-subj="esql-examples" target="_blank" href={docLinks.links.query.queryESQLExamples} + onClick={() => setIsESQLMenuPopoverOpen(false)} > {i18n.translate('unifiedSearch.query.queryBar.esqlMenu.documentation', { defaultMessage: 'Example queries', @@ -75,6 +78,7 @@ export const ESQLMenuPopover = () => { data-test-subj="esql-feedback" target="_blank" href={FEEDBACK_LINK} + onClick={() => setIsESQLMenuPopoverOpen(false)} > {i18n.translate('unifiedSearch.query.queryBar.esqlMenu.documentation', { defaultMessage: 'Submit feedback',