-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when the measured child is in a CSSTransition #129
Comments
Hmm this might have been fixed in #125. I’ll cut a new release tomorrow with that fix in it. Thanks for filing an issue! 🙏 |
@kmjennison can you please check the latest version |
Had a very quick look, the error is there but it's not a bug... As the @kmjennison proper solution would be to warp every child with it's own measure @souporserious What is the status with On other side |
Regarding my last comment, observing multi elements... Using the ReactTransitionGroup like in the example will not provide any event's from Bug is happening because
It was working in IMHO this is not a bug in // cc @kmjennison |
Thanks @piecyk, that makes sense. Is there a way for react-measure to ensure that it's only measuring one element at a time? If so, it would be helpful to log a warning when the user tries to measure more than one. |
@piecyk I've thought about hooks a lot with @kmjennison the current API doesn't lend to measuring multiple elements easily right now. It will definitely be first class in the new API I'm working on. Hooks should make reasoning about this a lot simpler. |
@kmjennison we can tweak the @souporserious Great to hear that, ping me if help is needed 💪 Will also try investigate some API proposals. |
@piecyk love that idea for |
@kmjennison imho you can close the issue now as the PR was merged, thanks! |
Thanks, @piecyk! @kmjennison please feel free to reopen if you experience any other issues. |
As of v2.2.2, there's an error when the measured component is in a
react-transition-group
CSSAnimation component:It occurs here. I'm guessing it's trying to measure a node after the transition removes it.
This did not throw an error in v2.1.3.
Error in v2.2.2 (note the console logs when you click the button):
https://jsfiddle.net/31a0vLmc/
No error in v2.1.3:
https://jsfiddle.net/yr6qcgmu/
The text was updated successfully, but these errors were encountered: