Skip to content

Commit 41db025

Browse files
authored
Add a watcher
If parent component changes seperator prop, the displayed value should change immediately and not after input interaction
1 parent dc28b47 commit 41db025

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/vue-numeric.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,13 @@ export default {
262262
this.$refs.readOnly.className = this.readOnlyClass
263263
})
264264
}
265+
},
266+
267+
separator(newValue, oldValue) {
268+
if (newValue !== oldValue) {
269+
this.process(this.valueNumber)
270+
this.amount = this.format(this.valueNumber)
271+
}
265272
}
266273
},
267274

0 commit comments

Comments
 (0)