Skip to content

Conversation

wifilinker
Copy link
Contributor

With transitionLeave=false, this change makes the container to not render leaving component at all.

Additionally it adds {animation-name}-height-active class to the container right after the {animation-name}-height has been added.

Previously transitionLeave being false did not affect the behavior and
in dom the old component still existed together with the new component.

This does not show old component at all when new component is ready to
be rendered.
When transitionLeave is set to false, it might happen that current component is not yet
rendered when a new component reaches this part of the code. At this point we want to
use the height and width of the latest rendered elment.
Similarly to ReactCSSTransitionGroup, adding `-height-active` suffix to the
container when we are transitioning height.
@marnusw marnusw merged commit 315775a into marnusw:master Feb 27, 2017
@marnusw
Copy link
Owner

marnusw commented Feb 27, 2017

Thanks a million for all these improvements @wifilinker! I'm sorry it took so long for me to review.

marnusw added a commit that referenced this pull request Feb 27, 2017
@urmastalimaa urmastalimaa deleted the improve-no-leave-transitions branch February 28, 2017 13:15
@marnusw marnusw mentioned this pull request Mar 8, 2017
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants