Skip to content

Commit adbdc3a

Browse files
committed
fix default value not accepting string type
1 parent 4ff8fa8 commit adbdc3a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-numeric",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "Input field component to display currency value based on Vue.",
55
"author": "Kevin Ongko",
66
"main": "src/vue-numeric.vue",

src/vue-numeric.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,13 @@ export default {
236236
mounted () {
237237
// Check default value from parent v-model.
238238
if (this.value) {
239-
this.processValue(this.value)
239+
this.processValue(this.formatToNumber(this.value))
240240
this.formatValue(this.value)
241241
}
242242
243243
// In case of delayed v-model new value.
244244
setTimeout(() => {
245-
this.processValue(this.value)
245+
this.processValue(this.formatToNumber(this.value))
246246
this.formatValue(this.value)
247247
}, 500)
248248
}

0 commit comments

Comments
 (0)