Skip to content

Commit

Permalink
Close the popover when a child is clio
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Sep 17, 2024
1 parent 46005df commit 86c81d3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const ESQLMenuPopover = () => {

const toggleLanguageComponent = useCallback(async () => {
setIsLanguageComponentOpen(!isLanguageComponentOpen);
setIsESQLMenuPopoverOpen(false);
}, [isLanguageComponentOpen]);

const esqlPanelItems = useMemo(() => {
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down

0 comments on commit 86c81d3

Please sign in to comment.