Skip to content

Commit

Permalink
Prevent double input event #44
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurk91 committed Dec 20, 2017
1 parent 1efe631 commit 789141a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
* @param newValue
*/
value(newValue) {
// Prevent updates if v-model value is same as input's current value
if (newValue === this.$el.value) return;
// Make sure we have a flatpickr instance
this.fp &&
// Don't update DOM when allowInput is set to true
Expand Down

0 comments on commit 789141a

Please sign in to comment.