ant-design/tests/__mocks__/rc-util/lib/Portal.js
Wei Zhu 55c85f77a1
Update dependendies (#8150)
* deps: upgrade rc-menu, and close: #2837

* test: update snapshots

* Update rc-calendar

* Update rc-cascader

* Update rc-dialog

* Update dropdown

* Update rc-select@7.1.0

* Update rc-slider

* Update rc-time-picker

* Update rc-tooltip

* Update rc-tree-select

* Mock rc-trigger and Portal

* Fix animation warning when inlineCollapsed changes

* fix: should use SubMenu[popupClassName]

* Fix typescript error

* Fix lint

* fix: style for menu

* Mock rc-trigger for React 15

* Remvoe allow_failures
2017-11-11 00:07:03 +08:00

20 lines
319 B
JavaScript

import React from 'react';
export default class Portal extends React.Component {
componentDidMount() {
this.createContainer();
}
createContainer() {
this.container = true;
this.forceUpdate();
}
render() {
if (this.container) {
return this.props.children;
}
return null;
}
}