Closed Bdragon93 closed 1 year ago
Hey @Bdragon93,
In version 3 onAnimationEnd
was renamed to onHeightAnimationEnd
, to avoid collision with the native method.
https://github.com/Stanko/react-animate-height#breaking-changes
Just swap it, and the example you added should start working: https://codesandbox.io/s/react-animate-height-animate-height-when-content-changes-forked-eggitr
Cheers!
P.S. Please be aware that AnimateHeight wasn't made with this specific usecase in mind. Having fixed height can result in content being cut off when user changes window size.
@Stanko Great thanks, that was my bad, I was switching versions for testing and forgot to adjust that prop then.
However, would be helpful if you remove onAnimationEnd
totally, no error when I pass the old named (wrong) prop and it even work for the first time as I mentioned
It is a native event, so it gets handy sometimes: https://developer.mozilla.org/en-US/docs/Web/API/Element/animationend_event
Code example https://codesandbox.io/s/react-animate-height-animate-height-when-content-changes-forked-ky6cvt?file=/src/index.js
Expected behavior
Possible Solution
Steps to Reproduce (for bugs)
Your Environment
Additional context