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

Always format displayValue with given formatter #12

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

Conversation

dluksza
Copy link

@dluksza dluksza commented Oct 21, 2017

In some cases when initial value was set to 0 it was not formatted. This lead to inconsistency in UI eg. first number was shown as '0' then as '5%' etc. to '100%' and then back to '0%'. It should always be presented as '0%'.

This change ensures that state.displayValue is always formatted with props.formatter. Provided that this property was set, if not it defaults back to 0.

In some cases when initial value was set to 0 it was not formatted. This lead to inconsistency in UI eg. first number was shown as '0' then as '5%' etc. to '100%'  and then back to '0%'. It should always be presented as '0%'.

This change ensures that state.displayValue is always formatted with props.formatter. Provided that this property was set, if not it defaults back to 0.
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.

1 participant