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

Exited state on component mount #366

Open
kesopeso opened this issue Jul 3, 2018 · 3 comments
Open

Exited state on component mount #366

kesopeso opened this issue Jul 3, 2018 · 3 comments
Labels

Comments

@kesopeso
Copy link

kesopeso commented Jul 3, 2018

So I have a component, that shouldn't be displayed when mounted:
<CSSTransition in={false} ... is the state when component mounts.

transitions i want to use:
enter: 'class-that-adds-transition class-that-sets-opacity-to-zero'
enterActive: 'class-that-sets-opacity-to-one'
exit: 'class-that-adds-transition class-that-sets-opacity-to-one'
exitActive: 'class-that-sets-opacity-to-zero'
exitDone: 'class-that-hides-component'

Is there a way to apply "exitedDone" class on that component when it mounts? Without any transitions etc... something like appear={true}, but for components that shouldn't be rendered if in=false

@taion
Copy link
Member

taion commented Jul 3, 2018

Are you saying the -done class name from #269 is not added to initially-exited transitions?

@jquense jquense added the bug label Jul 3, 2018
@JohnAlbin
Copy link

@taion Yep.

I have a component that has in={true} when initially mounted and the enterDone class is not applied.

That means I currently need to manually apply the done classes based on the boolean I pass to the in property. Which means there is not much point to even use exitDone and enterDone features.

@RoystonS
Copy link

I've just hit the same issue here. I'd be happy to get a PR together, but I'd need a little input from a maintainer: it doesn't look too hard to fix, but there are a few little decisions to make, such as whether (in the CSSTransition class) to call the 'exited' or 'entered' callbacks at startup, or to avoid that and only add the appropriate '-done' CSS classes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants