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
|
||||
if (this.submitOnEvent) {
|
||||
eventBus.on(this.submitOnEvent, () => {
|
||||
if (this.isDisabled) return;
|
||||
// Bootstrap task if button is not disabled.
|
||||
this.bootstrapTask();
|
||||
});
|
||||
eventBus.on(this.submitOnEvent, this.handleShortcutTrigger);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
beforeUnmount() {
|
||||
if (this.submitOnEvent) {
|
||||
eventBus.off(this.submitOnEvent);
|
||||
eventBus.off(this.submitOnEvent, this.handleShortcutTrigger);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleShortcutTrigger() {
|
||||
if (this.isDisabled) return;
|
||||
this.bootstrapTask();
|
||||
},
|
||||
handleClick() {
|
||||
if (this.taskStarted) {
|
||||
this.terminateTask();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue