Remove unnecessary savebutton vue component and create SaveButton Macro

This commit is contained in:
leigh-mil
2019-04-02 16:01:08 -04:00
parent 02cc18a93f
commit 1aaf4421ab
13 changed files with 25 additions and 49 deletions

View File

@@ -112,15 +112,11 @@ export default {
validateAndOpenModal: function() {
let isValid = this.$children.reduce((previous, newVal) => {
// display textInput error if it is not valid
if (newVal.$options.name == 'savebutton') {
return true
} else {
if (!newVal.showValid) {
newVal.showError = true
}
return newVal.showValid && previous
if (!newVal.showValid) {
newVal.showError = true
}
return newVal.showValid && previous
}, true)
this.validate()
isValid = this.errors.length == 0 && isValid