admin: add use spinner button for admin lists

This commit is contained in:
Jens Langhammer
2020-11-29 18:46:45 +01:00
parent a8dad2e393
commit 902953a2c7
23 changed files with 129 additions and 136 deletions

View File

@ -16,6 +16,9 @@ export class SpinnerButton extends LitElement {
@property()
isRunning = false;
@property()
form?: string;
static get styles() {
return [
GlobalsStyle,
@ -57,6 +60,11 @@ export class SpinnerButton extends LitElement {
if (this.isRunning === true) {
return;
}
if (this.form) {
// Because safari we can't just extend HTMLButtonElement, hence I have to implement
// these attributes by myself here, sigh...
document.querySelector<HTMLFormElement>(`#${this.form}`)?.submit();
}
this.setLoading();
}