Skip to content

Commit

Permalink
Refactor #1880 - For SlideMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Mar 17, 2021
1 parent bb31939 commit f9757f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/slidemenu/SlideMenu.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 SlideMenuSub extends Component {

Expand Down Expand Up @@ -403,6 +403,6 @@ export class SlideMenu 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 f9757f0

Please sign in to comment.