bugfix(actionButton) Unwrap arrow function at submitOnEvent
This commit is contained in:
parent
27f09b91bb
commit
0d2fb9de0b
1 changed files with 6 additions and 6 deletions
|
|
@ -219,22 +219,22 @@ export default {
|
||||||
}
|
}
|
||||||
// A global signal listener to perform the action
|
// A global signal listener to perform the action
|
||||||
if (this.submitOnEvent) {
|
if (this.submitOnEvent) {
|
||||||
eventBus.on(this.submitOnEvent, () => {
|
eventBus.on(this.submitOnEvent, this.handleShortcutTrigger);
|
||||||
if (this.isDisabled) return;
|
|
||||||
// Bootstrap task if button is not disabled.
|
|
||||||
this.bootstrapTask();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
if (this.submitOnEvent) {
|
if (this.submitOnEvent) {
|
||||||
eventBus.off(this.submitOnEvent);
|
eventBus.off(this.submitOnEvent, this.handleShortcutTrigger);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
handleShortcutTrigger() {
|
||||||
|
if (this.isDisabled) return;
|
||||||
|
this.bootstrapTask();
|
||||||
|
},
|
||||||
handleClick() {
|
handleClick() {
|
||||||
if (this.taskStarted) {
|
if (this.taskStarted) {
|
||||||
this.terminateTask();
|
this.terminateTask();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue