Skip to content

Commit

Permalink
Refactor #1880 - For TieredMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Mar 17, 2021
1 parent ba25655 commit 76e98da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/tieredmenu/TieredMenu.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import { classNames } from '../utils/ClassNames';
import DomHandler from '../utils/DomHandler';
Expand All @@ -8,6 +7,7 @@ import { CSSTransition } from 'react-transition-group';
import UniqueComponentId from '../utils/UniqueComponentId';
import ConnectedOverlayScrollHandler from '../utils/ConnectedOverlayScrollHandler';
import OverlayEventBus from '../overlayeventbus/OverlayEventBus';
import { Portal } from '../portal/Portal';

export class TieredMenu extends Component {

Expand Down Expand Up @@ -206,6 +206,6 @@ export class TieredMenu extends Component {
render() {
const element = this.renderElement();

return this.props.popup ? ReactDOM.createPortal(element, this.props.appendTo || document.body) : element;
return this.props.popup ? <Portal element={element} appendTo={this.props.appendTo} /> : element;
}
}

0 comments on commit 76e98da

Please sign in to comment.