react-native-animate-number icon indicating copy to clipboard operation
react-native-animate-number copied to clipboard

Always format displayValue with given formatter

Open dluksza opened this issue 7 years ago • 0 comments

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.

dluksza avatar Oct 21 '17 12:10 dluksza