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

Anyway to disable animation temporarily? #120

Open
terreb opened this issue Jul 27, 2018 · 2 comments
Open

Anyway to disable animation temporarily? #120

terreb opened this issue Jul 27, 2018 · 2 comments

Comments

@terreb
Copy link

terreb commented Jul 27, 2018

I would like to show animation of horizontal progress bar any time the user lands on a screen. Every time user opens screen I first reset progress state to 0 and then set it to required number to show it's moving from 0 to say 50%. The problem is that it shows animation twice when I first reset it to 0 and then when setting back to 50%. Is there a way to disable the animation in the first case when I reset it to 0?

@rauchp
Copy link
Contributor

rauchp commented Jul 27, 2018

I was going to suggest changing settings in animationConfig, but then I realized you can't access the progress object to get the next value the bar will be added to without componentWillReceive, so I've added the animateReset prop. Changes present in pull request #121. Hoping @oblador sees this!

With animateReset set to true
reset

With animateReset set to false
noreset

@terreb
Copy link
Author

terreb commented Jul 31, 2018

@pedrojor2, thank you very much sir! Will be waiting for @oblador to incorporate this into next release.

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