I have a problem displaying a zero value after null
.
null
is not displayed in the input, but if I change the value to 0, it also does not appear... Maybe I'm doing something wrong? Maybe someone came across this and is there a way to fix this problem? In the first input, I expect 0 to appear.
new Vue({
el : '#app',
data() {
return {
value : null,
valueString: null,
};
},
components: {
VueAutonumeric,
},
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<script src="https://unpkg.com/autonumeric@4.5.7/dist/autoNumeric.min.js"></script>
<script src="https://unpkg.com/vue-autonumeric@1.2.6/dist/vue-autonumeric.min.js"></script>
<div class="container">
<div id="app">
<p>Value is {{value}}</p><br>
<vue-autonumeric :options="''" v-model="value"></vue-autonumeric>
<button @click="() => value = 0">Set Zero</button>
<p>ValueStrign is {{valueString}}</p><br>
<vue-autonumeric :options="''" v-model="valueString"></vue-autonumeric>
<button @click="() => valueString = '0'">Set '0'</button>
</div>
</div>
This has been fixed with a workaround by setting the value to '0'... But I think this is not good.