Commit a7a33c21 authored by mfluharty's avatar mfluharty

Emit submit event instead of passing handler

parent b5a3004e
......@@ -24,10 +24,6 @@ export default {
required: true,
deep: true,
},
onSubmit: {
type: Function,
required: true,
},
},
computed: {
modalTitle() {
......@@ -52,6 +48,11 @@ export default {
return !_.isEmpty(this.pipeline.ref);
},
},
methods: {
emitSubmit(event) {
this.$emit('submit', event);
},
},
};
</script>
<template>
......@@ -60,7 +61,7 @@ export default {
:header-title-text="modalTitle"
:footer-primary-button-text="s__('Pipeline|Stop pipeline')"
footer-primary-button-variant="danger"
@submit="onSubmit"
@submit="emitSubmit($event)"
>
<p v-html="modalText"></p>
......
......@@ -84,6 +84,6 @@ export default {
:view-type="viewType"
:canceling-pipeline="cancelingPipeline"
/>
<pipeline-stop-modal :pipeline="pipeline" :on-submit="onSubmit" />
<pipeline-stop-modal :pipeline="pipeline" @submit="onSubmit" />
</div>
</template>
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