Skip to content

Commit

Permalink
Refactor #1878 - For TieredMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Mar 16, 2021
1 parent 0a63483 commit c63ebf1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/tieredmenu/TieredMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class TieredMenu extends Component {
this.onEnter = this.onEnter.bind(this);
this.onEntered = this.onEntered.bind(this);
this.onExit = this.onExit.bind(this);
this.onExited = this.onExited.bind(this);
this.onPanelClick = this.onPanelClick.bind(this);

this.id = this.props.id || UniqueComponentId();
Expand Down Expand Up @@ -109,6 +110,10 @@ export class TieredMenu extends Component {
this.unbindScrollListener();
}

onExited() {
DomHandler.revertZIndex();
}

bindDocumentListeners() {
this.bindDocumentClickListener();
this.bindDocumentResizeListener();
Expand Down Expand Up @@ -188,7 +193,7 @@ export class TieredMenu extends Component {

return (
<CSSTransition nodeRef={this.menuRef} classNames="p-connected-overlay" in={this.state.visible} timeout={{ enter: 120, exit: 100 }}
unmountOnExit onEnter={this.onEnter} onEntered={this.onEntered} onExit={this.onExit}>
unmountOnExit onEnter={this.onEnter} onEntered={this.onEntered} onExit={this.onExit} onExited={this.onExited}>
<div ref={this.menuRef} id={this.id} className={className} style={this.props.style} onClick={this.onPanelClick}>
<TieredMenuSub model={this.props.model} root popup={this.props.popup} />
</div>
Expand Down

0 comments on commit c63ebf1

Please sign in to comment.