Overview of the problem
Buefy version: [8.20.0]
Vuejs version: [2.6.11]
OS/Browser: OSX 10.15.5 / Chrome 83.0.4103.116
Description
Not sure if this is really a bug or intended behaviour, however a Progress component set to 0 precision will truncate trailing zeroes on whole numbers, whereas I believe the intention is to only remove them on decimal numbers.
If I'm wrong, feel free to close the issue, though perhaps it's worth updating the documentation to clarify, but I think it's particularly confusing when dealing with percentages.
Steps to reproduce
- Set up a
b-progress component with show-value="true", precision="0" and a whole value divisible by 10, e.g. value="100", e.g.:
<b-progress value="100" show-value="true" format="percent" precision="0" />
Expected behavior
Particularly for percentages, whole number should be displayed, i.e. in example above I would expect to see 100%.
Actual behavior
The trailing zeroes are trimmed on whole numbers, resulting in a confusing displayed value (again, particularly relevant for percentages), i.e. with the example input value of 100 the result is 1%:

This is even reproducible in the official documentation.
Note: This issue can be circumvented by passing keep-trailing-zeroes="true", however I still think it's a bug and should not require this workaround by default, 100.00 is the same value as 100 but 1 is not quite the same as 100 and changing the actual value seems misleading.
Overview of the problem
Buefy version: [8.20.0]
Vuejs version: [2.6.11]
OS/Browser: OSX 10.15.5 / Chrome 83.0.4103.116
Description
Not sure if this is really a bug or intended behaviour, however a Progress component set to
0precision will truncate trailing zeroes on whole numbers, whereas I believe the intention is to only remove them on decimal numbers.If I'm wrong, feel free to close the issue, though perhaps it's worth updating the documentation to clarify, but I think it's particularly confusing when dealing with percentages.
Steps to reproduce
b-progresscomponent withshow-value="true",precision="0"and a whole value divisible by 10, e.g.value="100", e.g.:Expected behavior
Particularly for percentages, whole number should be displayed, i.e. in example above I would expect to see
100%.Actual behavior
The trailing zeroes are trimmed on whole numbers, resulting in a confusing displayed value (again, particularly relevant for percentages), i.e. with the example input value of
100the result is1%:This is even reproducible in the official documentation.
Note: This issue can be circumvented by passing
keep-trailing-zeroes="true", however I still think it's a bug and should not require this workaround by default,100.00is the same value as100but1is not quite the same as100and changing the actual value seems misleading.