diff --git a/web/src/elements/buttons/SpinnerButton.ts b/web/src/elements/buttons/SpinnerButton.ts index 637e7b1ac..14e6ca6ac 100644 --- a/web/src/elements/buttons/SpinnerButton.ts +++ b/web/src/elements/buttons/SpinnerButton.ts @@ -12,10 +12,7 @@ export class SpinnerButton extends LitElement { isRunning = false; @property() - form?: string; - - @property() - callAction: () => void = this.defaultCallAction; + callAction: () => void = () => {}; static get styles(): CSSResult[] { return [ @@ -55,25 +52,18 @@ export class SpinnerButton extends LitElement { } defaultCallAction(): void { - if (this.isRunning === true) { - return; - } - if (this.form) { - // Since the form= attribute is only used within a modal button, - // we can assume the form is always two levels up - this.parentElement?.parentElement?.querySelector(`#${this.form}`)?.dispatchEvent(new Event("submit", { - bubbles: true, - cancelable: true, - })); - } - this.setLoading(); } render(): TemplateResult { return html`