Added global event listeners to task submitters
This commit is contained in:
parent
2b9bec24f1
commit
9cf491aeb0
2 changed files with 27 additions and 2 deletions
|
|
@ -78,7 +78,12 @@ export default {
|
|||
buttonPrimary: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
default: true
|
||||
},
|
||||
submitOnEvent: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -101,7 +106,20 @@ export default {
|
|||
|
||||
created() {},
|
||||
|
||||
beforeDestroy() {},
|
||||
mounted() {
|
||||
// A global signal listener to perform a move action
|
||||
if (this.submitOnEvent) {
|
||||
this.$root.$on(this.submitOnEvent, () => {
|
||||
this.bootstrapTask();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
if (this.submitOnEvent) {
|
||||
this.$root.$off(this.submitOnEvent);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
bootstrapTask: function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue