Use named arguments in onSubmit method

parent f9077b6a
......@@ -220,7 +220,7 @@ export default {
},
},
methods: {
onSubmit(runAfterCreate = true, button = this.$options.saveAndRunScanBtnId) {
onSubmit({ runAfterCreate = true, button = this.$options.saveAndRunScanBtnId } = {}) {
if (this.glFeatures.dastSavedScans) {
this.form.showValidation = true;
if (!this.form.state) {
......@@ -505,7 +505,7 @@ export default {
data-testid="on-demand-scan-save-button"
:disabled="isSaveButtonDisabled"
:loading="loading === $options.saveScanBtnId"
@click="onSubmit(false, $options.saveScanBtnId)"
@click="onSubmit({ runAfterCreate: false, button: $options.saveScanBtnId })"
>
{{ s__('OnDemandScans|Save scan') }}
</gl-button>
......
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