web/admin: trigger update when provider wizard finishes
closes #2599 Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user