Remove old field-mount and field-change emitters and listeners.
Replace FormMixin with new functionality.
This commit is contained in:
@@ -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,
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user