Closing animation doesn't work on React <16.3
catriuspham opened this issue · 1 comments
catriuspham commented
The block under doesn't work on older React which makes closing happens instantly without animation.
getSnapshotBeforeUpdate() {
if (!this.container || !this.content) {
return null;
}
if (this.container.style.height === 'auto') {
const {clientHeight: contentHeight} = this.content;
this.container.style.height = `${contentHeight}px`;
}
return null;
}
My suggestion is to use https://github.com/reactjs/react-lifecycles-compat.
nkbt commented
Peer dependency declares ^16.3.0 version, anything prior to that is not expected to work as intended