BigW Consortium Gitlab

Commit e73da567 by Dennis Tang

clean up enableSubmit check

parent 4b752e2e
...@@ -44,6 +44,9 @@ export default { ...@@ -44,6 +44,9 @@ export default {
computed: { computed: {
...mapState(['selectedProject', 'selectedZone', 'selectedMachineType', 'machineTypes']), ...mapState(['selectedProject', 'selectedZone', 'selectedMachineType', 'machineTypes']),
...mapGetters(['hasProject', 'hasZone', 'hasMachineType']), ...mapGetters(['hasProject', 'hasZone', 'hasMachineType']),
allDropdownsSelected() {
return this.hasProject && this.hasZone && this.hasMachineType;
},
isDisabled() { isDisabled() {
return !this.selectedProject || !this.selectedZone; return !this.selectedProject || !this.selectedZone;
}, },
...@@ -107,7 +110,7 @@ export default { ...@@ -107,7 +110,7 @@ export default {
}); });
}, },
enableSubmit() { enableSubmit() {
if (this.hasProject && this.hasZone && this.hasMachineType) { if (this.allDropdownsSelected) {
const submitButtonEl = document.querySelector('.js-gke-cluster-creation-submit'); const submitButtonEl = document.querySelector('.js-gke-cluster-creation-submit');
if (submitButtonEl) { if (submitButtonEl) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment