Initial Value Empty if initial value is ZERO
See original GitHub issueExpected Behavior
My initial value is Zero. So I expect to see the value Zero formatted the way I configured it. I expect to see the field like this when I first open the page:
Actual Behavior
When I first load the page all the values that are initially zero are rendered as empty fields:
If I click on the field then I get a value zero shown and if I click out of the field (blur) then the zero stays there formatted too. However, if I navigate to another page and get back the value is again gone.
This only happens on values that are ZERO. All other values get correctly displayed initially too. I thought it might have something to do with the default value but that wasn’t the case.
I took a look and thought this might be related to #5 but it seems to be something a bit different.
Specifications
- Plugin Version: 4.2.1
- Vue.js Version: 2.6.11
- Browser: Chrome
- OS: Linux
Code
Here is the component configuration:
<vue-numeric
v-model="ebitdaRate"
decimal-separator=","
separator="."
currency="%"
currency-symbol-position="suffix"
:precision="2"
:minus="true"
class="growth-rate-input"
/>
I am using the vue-class-component so I won’t add the component Java code here, but I can guarantee that this is a reactive field which works correctly updating (set and get).
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (6 by maintainers)
Top GitHub Comments
Added the fix in 2.4.2, thanks for the input guys, sorry for the slow response https://github.com/kevinongko/vue-numeric/releases/tag/v2.4.2
Good day, I totally need that, too. Would really be a great help, if that could be merged! Thank you so much for all your effort! Have a great day!