Skip to content

Commit

Permalink
toggle flyout
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankeairns committed Mar 11, 2019
1 parent 31f0961 commit d4c6b63
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/components/nav_drawer/nav_drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down

0 comments on commit d4c6b63

Please sign in to comment.