web/admin: trigger update when provider wizard finishes

closes #2599

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-04-04 10:38:26 +02:00
parent 31546da796
commit fc6742a17e
6 changed files with 1907 additions and 2336 deletions

View File

@ -45,7 +45,10 @@ export class Wizard extends ModalButton {
this.requestUpdate();
}
finalHandler?: () => Promise<void>;
@property({ attribute: false })
finalHandler: () => Promise<void> = () => {
return Promise.resolve();
};
renderModalInner(): TemplateResult {
const firstPage = this.querySelector<WizardPage>(`[slot=${this.steps[0]}]`);
@ -116,9 +119,7 @@ export class Wizard extends ModalButton {
return;
}
if (currentIndex === this.steps.length - 1) {
if (this.finalHandler) {
await this.finalHandler();
}
await this.finalHandler();
this.open = false;
} else {
const nextPage = this.querySelector<WizardPage>(