Remove old field-mount and field-change emitters and listeners.

Replace FormMixin with new functionality.
This commit is contained in:
leigh-mil
2019-11-13 15:59:43 -05:00
parent 3576551f42
commit bc0382834b
9 changed files with 21 additions and 176 deletions

View File

@@ -1,5 +1,3 @@
import { emitEvent } from '../lib/emitters'
export default {
name: 'checkboxinput',
@@ -15,22 +13,9 @@ export default {
}
},
created: function() {
emitEvent('field-mount', this, {
optional: this.optional,
name: this.name,
valid: this.optional || this.isChecked,
})
},
methods: {
onInput: function(e) {
onInput: function() {
this.$parent.$emit('field-change')
emitEvent('field-change', this, {
value: e.target.checked,
name: this.name,
valid: this.optional || this.isChecked,
})
},
},