bugfix(actionButton) Unwrap arrow function at submitOnEvent

This commit is contained in:
Antonio Anaya 2026-05-11 07:06:00 -06:00 committed by Antonio Anaya
parent 27f09b91bb
commit 0d2fb9de0b

View file

@ -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();