Skip to content

Commit 0cdfc92

Browse files
committed
fix popupInstance
1 parent c639ea3 commit 0cdfc92

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-trigger",
3-
"version": "1.6.2",
3+
"version": "1.6.3",
44
"description": "base abstract trigger component for react",
55
"keywords": [
66
"react",

src/Trigger.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ const Trigger = React.createClass({
105105
const state = this.state;
106106
if (this.popupRendered) {
107107
const self = this;
108-
self.popupInstance = ReactDOM.unstable_renderSubtreeIntoContainer(this,
108+
ReactDOM.unstable_renderSubtreeIntoContainer(this,
109109
this.getPopupElement(),
110-
this.getPopupContainer(), () => {
110+
this.getPopupContainer(), function mounted() {
111+
self.popupInstance = this;
111112
if (prevState.popupVisible !== state.popupVisible) {
112113
props.afterPopupVisibleChange(state.popupVisible);
113114
}

0 commit comments

Comments
 (0)