diff --git a/src/components/nav_drawer/nav_drawer.js b/src/components/nav_drawer/nav_drawer.js index af69850a38c..e4cc695315f 100644 --- a/src/components/nav_drawer/nav_drawer.js +++ b/src/components/nav_drawer/nav_drawer.js @@ -96,14 +96,18 @@ export class EuiNavDrawer extends Component { expandFlyout = (links, title) => { const content = links; - this.setState({ - flyoutIsCollapsed: false, - navFlyoutTitle: title, - navFlyoutContent: content, - isCollapsed: true, - toolTipsEnabled: false, - outsideClickDisabled: false, - }); + if (this.state.navFlyoutTitle === title) { + this.collapseFlyout(); + } else { + this.setState({ + flyoutIsCollapsed: false, + navFlyoutTitle: title, + navFlyoutContent: content, + isCollapsed: true, + toolTipsEnabled: false, + outsideClickDisabled: false, + }); + } }; collapseFlyout = () => {