Skip to content
Permalink
Browse files

fix(MdField): prevent MdInput and MdTextarea from emit input events d…

…irectly (#1285)

* (Fix #1261) Don't emit input directly in MdInput and MdTextarea

* use spread operator (+babel) instead of Object.assign for browser compatiblity
  • Loading branch information...
korylprince authored and marcosmoura committed Dec 22, 2017
1 parent 89138eb commit 00832e9a521191c88c69832e184f514e821c38db
Showing with 6 additions and 8 deletions.
  1. +3 −4 src/components/MdField/MdInput/MdInput.vue
  2. +3 −4 src/components/MdField/MdTextarea/MdTextarea.vue
@@ -35,10 +35,9 @@
return this.type === 'password'
},
listeners () {
return {
...this.$listeners,
input: event => this.$emit('input', event.target.value)
}
var l = {...this.$listeners}
delete l.input
return l
}
},
watch: {
@@ -48,10 +48,9 @@
},
computed: {
listeners () {
return {
...this.$listeners,
input: event => this.$emit('input', event.target.value)
}
var l = {...this.$listeners}
delete l.input
return l
},
textareaStyles () {
return {

0 comments on commit 00832e9

Please sign in to comment.
You can’t perform that action at this time.