Skip to content

Commit

Permalink
fix default value not accepting string type
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinongko committed Apr 11, 2017
1 parent 4ff8fa8 commit adbdc3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-numeric",
"version": "1.5.0",
"version": "1.5.1",
"description": "Input field component to display currency value based on Vue.",
"author": "Kevin Ongko",
"main": "src/vue-numeric.vue",
Expand Down
4 changes: 2 additions & 2 deletions src/vue-numeric.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,13 @@ export default {
mounted () {
// Check default value from parent v-model.
if (this.value) {
this.processValue(this.value)
this.processValue(this.formatToNumber(this.value))
this.formatValue(this.value)
}
// In case of delayed v-model new value.
setTimeout(() => {
this.processValue(this.value)
this.processValue(this.formatToNumber(this.value))
this.formatValue(this.value)
}, 500)
}
Expand Down

0 comments on commit adbdc3a

Please sign in to comment.