diff --git a/web/src/admin/applications/wizard/BasePanel.ts b/web/src/admin/applications/wizard/BasePanel.ts index f469a029d..3601b89f6 100644 --- a/web/src/admin/applications/wizard/BasePanel.ts +++ b/web/src/admin/applications/wizard/BasePanel.ts @@ -17,14 +17,22 @@ export class ApplicationWizardPageBase extends CustomEmitterElement(AKElement) { @query("form") form!: HTMLFormElement; + rendered = false; + // @ts-expect-error - @consume({ context: applicationWizardContext, subscribe: true }) - @state() + @consume({ context: applicationWizardContext }) public wizard!: WizardState; + shouldUpdate(changedProperties: Map) { + if (!this.rendered) { + this.rendered = true; + return true; + } + return (changedProperties.size !== 0) + } + dispatchWizardUpdate(update: Partial) { // TODO: Incorporate this into the message heading upward: "the current step is valid." - console.log(this.form.reportValidity()); this.dispatchCustomEvent("ak-application-wizard-update", { ...this.wizard, diff --git a/web/src/admin/applications/wizard/ak-application-wizard.ts b/web/src/admin/applications/wizard/ak-application-wizard.ts index d5c3beb26..6882c2743 100644 --- a/web/src/admin/applications/wizard/ak-application-wizard.ts +++ b/web/src/admin/applications/wizard/ak-application-wizard.ts @@ -30,7 +30,6 @@ export class ApplicationWizard extends CustomListenerElement(AKElement) { * Providing a context at the root element */ @provide({ context: applicationWizardContext }) - @property({ attribute: false }) wizardState: WizardState = { step: 0, providerType: "", diff --git a/web/src/admin/applications/wizard/application/ak-application-wizard-application-details.ts b/web/src/admin/applications/wizard/application/ak-application-wizard-application-details.ts index 4ecdba6c1..2027caf86 100644 --- a/web/src/admin/applications/wizard/application/ak-application-wizard-application-details.ts +++ b/web/src/admin/applications/wizard/application/ak-application-wizard-application-details.ts @@ -31,7 +31,9 @@ export class ApplicationWizardApplicationDetails extends BasePanel { }); } + render(): TemplateResult { + console.log("HUH?"); return html`