Add emiter to all input fields
This commit is contained in:
@@ -10,6 +10,7 @@ export default {
|
||||
this.$root.$emit('field-change', {
|
||||
value: e.target.checked,
|
||||
name: this.name,
|
||||
parent_uid: this.$parent._uid,
|
||||
})
|
||||
},
|
||||
},
|
||||
|
@@ -135,7 +135,11 @@ export default {
|
||||
|
||||
methods: {
|
||||
_emitChange: function(name, value, valid) {
|
||||
this.$root.$emit('field-change', { value, valid, name })
|
||||
this.$root.$emit('field-change', {
|
||||
value,
|
||||
name,
|
||||
parent_uid: this.$parent && this.$parent._uid,
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
|
@@ -43,6 +43,7 @@ export default {
|
||||
this.$root.$emit('field-change', {
|
||||
value: e.target.value,
|
||||
name: this.name,
|
||||
parent_uid: this.$parent._uid,
|
||||
})
|
||||
this.showError = false
|
||||
this.showValid = true
|
||||
|
@@ -24,6 +24,7 @@ export default {
|
||||
this.$root.$emit('field-change', {
|
||||
value: e.target.value,
|
||||
name: this.name,
|
||||
parent_uid: this.$parent._uid,
|
||||
})
|
||||
this.showError = false
|
||||
this.showValid = true
|
||||
|
@@ -128,6 +128,7 @@ export default {
|
||||
value: this._rawValue(value),
|
||||
valid,
|
||||
name: this.name,
|
||||
parent_uid: this.$parent._uid,
|
||||
})
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user