Skip to content
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

Have the transitionName also applied to the CSSTransitionGroup component #42

Closed
Shywim opened this issue Apr 20, 2017 · 2 comments
Closed

Comments

@Shywim
Copy link

Shywim commented Apr 20, 2017

I'm using two differents CSSTransitionGroup, one for enter transition and the other for leave transition. I do this because I have the same leave transition for the children, but I have different enter transition depending on which children is mounted and these CSSTransitionGroup are nested deeper which cause my enter transition and my leave transition to happen both at the same time.

For now I just put a longer delay in CSS but when there's no leave animation to do (i.e. when first loading) there's a small noticeable delay where nothing happen.

I know I can workaround it directly in JS or with ReactTransitionGroup but it would be nice to have an option to add a class to the CSSTransitionGroup itself when it's animating so we can continue to work exclusively with CSS. 😄

@jquense
Copy link
Collaborator

jquense commented Apr 26, 2017

That's a bit tough to do in the current API, but if you could check out #24 we probably could support that in the new proposed api, as it provides a lot more callback hooks. Maybe see if that could meet your use case? It might even avoid your need for two groups as it allows different animations per child

@Shywim
Copy link
Author

Shywim commented Apr 27, 2017

Oh I didn't see when I was searching. That might do it, I'll forward to it, thanks!

@Shywim Shywim closed this as completed Apr 27, 2017
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

No branches or pull requests

2 participants