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

Add "noAnimateOnMount" prop #194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

AlicanC
Copy link

@AlicanC AlicanC commented May 11, 2018

Fixes #186

Note: A better name could be decided for the prop.

@AlicanC
Copy link
Author

AlicanC commented May 11, 2018

There's also #87 where the opposite is requested. Maybe this could be renamed and turned into a three-option enum: "always", "onMount", "onUpdate"

@oblador
Copy link
Owner

oblador commented May 31, 2018

Thank you for your PR! I think the enum approach would be better, would you mind updating the PR with this?

@Gyran
Copy link

Gyran commented Jul 6, 2018

This something I would want as well. I can continue on the PR if @AlicanC no longer need this?

What would be the expected behaviour for onUpdate? When we don't want to animate on mount, we just "finish" the animation so it looks like the animation is done. Is that something that would be wanted for the onUpdate case as well?
Can't really se a case where someone would set to only animate on onMount and then change the animate property.

@AlicanC
Copy link
Author

AlicanC commented Jul 6, 2018

I can continue on the PR if @AlicanC no longer need this?

We need this and we are using our fork for it. I don't have any time to spend for a PR though, so continue as you wish.

When we don't want to animate on mount, we just "finish" the animation so it looks like the animation is done.

Yes, this was the behavior we needed.

@sibelius
Copy link

can we have a animating props instead?

animating={true} will start animation?
animating={false} will stop animation?

@oblador what do you think of this approach?

we can check on componentDidUpdate if prop has updated to start and stop animation

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.

4 participants