Skip to content

Commit

Permalink
Refactor #1880 - For ContextMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Mar 17, 2021
1 parent 72a65b9 commit 0c7c0bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/contextmenu/ContextMenu.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { classNames } from '../utils/ClassNames';
import ReactDOM from 'react-dom';
import DomHandler from '../utils/DomHandler';
import { CSSTransition } from 'react-transition-group';
import { Ripple } from '../ripple/Ripple';
import ObjectUtils from '../utils/ObjectUtils';
import { Portal } from '../portal/Portal';

class ContextMenuSub extends Component {

Expand Down Expand Up @@ -476,6 +476,6 @@ export class ContextMenu extends Component {
render() {
const element = this.renderContextMenu();

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

0 comments on commit 0c7c0bf

Please sign in to comment.