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

[feat]: /docs/components/number-ticker - StartValue #426

Closed
dinbtechit opened this issue Nov 28, 2024 · 9 comments · May be fixed by #428
Closed

[feat]: /docs/components/number-ticker - StartValue #426

dinbtechit opened this issue Nov 28, 2024 · 9 comments · May be fixed by #428

Comments

@dinbtechit
Copy link

dinbtechit commented Nov 28, 2024

Is your feature request related to a problem? Please describe.
Always starts from zero. It would be nice if we can provide a starting value

Describe the solution you'd like

<NumberTicker startValue={50} value={100} />

Describe alternatives you've considered
N/A

Additional context
N/A

@PraveenShinde3
Copy link

Can you please assign it to me?

@dinbtechit
Copy link
Author

@PraveenShinde3 - Could you also address the value with commas, or would that be a separate issue?

@PraveenShinde3
Copy link

I have made a change, so that we can give a custom "start value"

For example : in following demo i have set the startValue to "500" and value to "1000" and for decimal the startValue is "3.99" and value to "8.67"

Screen.Recording.2024-11-29.205216.mp4

@PraveenShinde3
Copy link

@dinbtechit what exactly is the issue with commas?

@dinbtechit
Copy link
Author

@dinbtechit what exactly is the issue with commas?

Oh I did not realize. The comma's were already taken care of. I am curios what does it look like for large numbers...

<NumberTicker startValue={'168,500.10'} value={'170,500.99'}  

@PraveenShinde3
Copy link

this is how it looks as per your given startValue and value

the code would be something like this
<NumberTicker startValue={168500.1} value={170500.99} decimalPlaces={2} />

Screen.Recording.2024-11-29.210929.mp4

@dinbtechit
Copy link
Author

this is how it looks as per your given startValue and value

the code would be something like this <NumberTicker startValue={168500.1} value={170500.99} decimalPlaces={2} />

Screen.Recording.2024-11-29.210929.mp4

That looks freaking good!! Great job! thanks @PraveenShinde3

@PraveenShinde3
Copy link

Hoping this PR gets approved 🤞

@itsarghyadas
Copy link
Collaborator

Hey, we discussed this and decided not to add props like that for now. Instead, we plan to set a custom duration for each numberTicker component so they can finish at their own pace (or simultaneously) if needed. Thanks for the feedback! If we decide to add this props in the future, we'll reopen the discussion.

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 a pull request may close this issue.

3 participants