Commit a7a33c21 authored by mfluharty's avatar mfluharty

Emit submit event instead of passing handler

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