react-native-circular-progress-indicator
react-native-circular-progress-indicator copied to clipboard
feature-request: turn off animation
It would be interesting to have the ability to turn off the animation, the component works only statically. This is very useful for list in order to optimize loading.
@yepMad Have you tried setting duration={0}
? Does that do the trick for you?
Hello! @jordiboehme I am not the original requester of this feature, however, I have found that my team would also benefit from this feature.
I have tried using duration={0}
within my <CircularProgress />
component, but it does not prevent the component from animating.
I was hoping to use the prop startInPausedState
, which is defined in the docs as part of the CircularProgressBase Props that are accessible to CircularProgress, but I am getting a TS error that seems to suggest otherwise.
Type '{ allowFontScaling: true; value: number; radius: number; activeStrokeColor: string | undefined; inActiveStrokeColor: string | undefined; showProgressValue: false; title: string; titleStyle: { ...; }; onAnimationComplete: () => void; startInPausedState: boolean; }' is not assignable to type 'IntrinsicAttributes & CircularProgressProps & RefAttributes<ProgressRef>'.
Property 'startInPausedState' does not exist on type 'IntrinsicAttributes & CircularProgressProps & RefAttributes<ProgressRef>'.ts(2322)
startInPaused
will not be useful in this use-case as it would just keep the progress at 0 until play
or reAnimate
is called. Duration 0
would also might not be a good idea as it will still run the animation but with a duration of 0. How about adding a simple circle progress without any of the animation overhead as a separate component, say StaticProgress
?.
How about adding a simple circle progress without any of the animation overhead as a separate component, say
StaticProgress
?.
Would be great to have this