Skip to content

Commit

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

export class CascadeSelect extends Component {

Expand Down Expand Up @@ -399,7 +399,7 @@ export class CascadeSelect extends Component {
</CSSTransition>
);

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

renderElement() {
Expand Down

0 comments on commit fa9cc6f

Please sign in to comment.