mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 23:35:38 +08:00
55c85f77a1
* 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
20 lines
319 B
JavaScript
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;
|
|
}
|
|
}
|