Open Kelderic opened 6 years ago
This is neat, but didn't work for me ... only doing this during the initial rendering pass caused problems after the initial rendering pass. If I have time I might play with this to respect zero fill during every render pass.
I think this is a great approach to the zero fill problem -- simply let the value dictate how to zero-fill.
Currently, an element that is initialized while having a textContent of "000", will be shown as "0". This commit takes a snapshop of the initial value, and then uses that snapshot in the initial render pass, rather than converting the string to a number and then back to a string. This respects leading zeros.