Update BaseForm and nested vue components to properly use emitters

This commit is contained in:
leigh-mil
2019-11-13 14:28:10 -05:00
parent 0abe27eb36
commit 1ecd786857
3 changed files with 10 additions and 18 deletions

View File

@@ -1,15 +1,6 @@
import optionsinput from '../components/options_input'
import textinput from '../components/text_input'
import { emitEvent } from '../lib/emitters'
export default {
name: 'multicheckboxinput',
components: {
optionsinput,
textinput,
},
props: {
name: String,
initialErrors: {
@@ -41,10 +32,7 @@ export default {
methods: {
onInput: function(e) {
emitEvent('field-change', this, {
value: e.target.value,
name: this.name,
})
this.$parent.$emit('field-change')
this.showError = false
this.showValid = true
},
@@ -52,4 +40,10 @@ export default {
this.otherChecked = !this.otherChecked
},
},
computed: {
valid: function() {
return this.showValid
},
},
}