no need to pass along modalName
This commit is contained in:
parent
cb3947962c
commit
6b0c285d1c
@ -90,7 +90,7 @@ export default {
|
|||||||
handleSubmit: function (event) {
|
handleSubmit: function (event) {
|
||||||
if (!this.readyToSubmit) {
|
if (!this.readyToSubmit) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
this.validateAndOpenModal(this.modalName)
|
this.validateAndOpenModal()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ export default {
|
|||||||
this.closeModal(this.modalName)
|
this.closeModal(this.modalName)
|
||||||
},
|
},
|
||||||
|
|
||||||
validateAndOpenModal: function (modalName) {
|
validateAndOpenModal: function () {
|
||||||
let isValid = this.$children.reduce((previous, newVal) => {
|
let isValid = this.$children.reduce((previous, newVal) => {
|
||||||
// display textInput error if it is not valid
|
// display textInput error if it is not valid
|
||||||
if (!newVal.showValid) {
|
if (!newVal.showValid) {
|
||||||
@ -114,7 +114,7 @@ export default {
|
|||||||
|
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
this.readyToSubmit = true
|
this.readyToSubmit = true
|
||||||
this.openModal(modalName)
|
this.openModal(this.modalName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user