react-popover
react-popover copied to clipboard
rm deprecated componentWillReceiveProps
fixes #207
When it will be Merged? I really need it
after applying this patch, popovers no longer open for me. There are no errors or warnings in the console. The HEAD of master (905e7545e32806abf8ee38f4557621e9bc5b1c1a) works fine.
edit:
The ref's containerEl
is always null with this change applied.
may be related to https://stackoverflow.com/a/50019873/340799
edit 2:
splitting the open/enter and close/exit calls resolved this for me. It can't be assumed that the state will toggle everytime:
componentDidUpdate(propsPrev, statePrev) {
//log(`Component did update!`)
const willOpen = !propsPrev.isOpen && this.props.isOpen
const willClose = propsPrev.isOpen && !this.props.isOpen
if (willOpen) {
this.open()
} else if (willClose) {
this.close()
}
const didOpen = !statePrev.toggle && this.state.toggle
const didClose = statePrev.toggle && !this.state.toggle
if (didOpen) {
this.enter()
}
else if (didClose) {
this.exit()
}
}
Please merge
@xxx Is this going to get a release?
@xxx will this be merged soon?
@xxx will this be merged soon?
+1
Any news about this? Thx