From 2d55d3c743613b0723c5f2eb8c767883bf3ca30c Mon Sep 17 00:00:00 2001 From: Jens L Date: Mon, 13 Mar 2023 23:42:52 +0100 Subject: [PATCH] web/admin: fix wizards with radio selects not working correctly after use (#4933) Signed-off-by: Jens Langhammer --- web/src/admin/outposts/ServiceConnectionWizard.ts | 2 +- web/src/admin/policies/PolicyWizard.ts | 2 +- web/src/admin/property-mappings/PropertyMappingWizard.ts | 2 +- web/src/admin/providers/ProviderWizard.ts | 2 +- web/src/admin/sources/SourceWizard.ts | 2 +- web/src/admin/stages/StageWizard.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/src/admin/outposts/ServiceConnectionWizard.ts b/web/src/admin/outposts/ServiceConnectionWizard.ts index 2e1067ff0..1c8c3e0aa 100644 --- a/web/src/admin/outposts/ServiceConnectionWizard.ts +++ b/web/src/admin/outposts/ServiceConnectionWizard.ts @@ -36,7 +36,7 @@ export class InitialServiceConnectionWizardPage extends WizardPage { ?.querySelectorAll("input[type=radio]") .forEach((radio) => { if (radio.checked) { - this.host.isValid = true; + radio.dispatchEvent(new CustomEvent("change")); } }); }; diff --git a/web/src/admin/policies/PolicyWizard.ts b/web/src/admin/policies/PolicyWizard.ts index 274d5a7d4..4d925c369 100644 --- a/web/src/admin/policies/PolicyWizard.ts +++ b/web/src/admin/policies/PolicyWizard.ts @@ -42,7 +42,7 @@ export class InitialPolicyWizardPage extends WizardPage { ?.querySelectorAll("input[type=radio]") .forEach((radio) => { if (radio.checked) { - this.host.isValid = true; + radio.dispatchEvent(new CustomEvent("change")); } }); }; diff --git a/web/src/admin/property-mappings/PropertyMappingWizard.ts b/web/src/admin/property-mappings/PropertyMappingWizard.ts index 7b6d0c579..187736b8b 100644 --- a/web/src/admin/property-mappings/PropertyMappingWizard.ts +++ b/web/src/admin/property-mappings/PropertyMappingWizard.ts @@ -39,7 +39,7 @@ export class InitialPropertyMappingWizardPage extends WizardPage { ?.querySelectorAll("input[type=radio]") .forEach((radio) => { if (radio.checked) { - this.host.isValid = true; + radio.dispatchEvent(new CustomEvent("change")); } }); }; diff --git a/web/src/admin/providers/ProviderWizard.ts b/web/src/admin/providers/ProviderWizard.ts index 16c70266d..d8141ffad 100644 --- a/web/src/admin/providers/ProviderWizard.ts +++ b/web/src/admin/providers/ProviderWizard.ts @@ -41,7 +41,7 @@ export class InitialProviderWizardPage extends WizardPage { ?.querySelectorAll("input[type=radio]") .forEach((radio) => { if (radio.checked) { - this.host.isValid = true; + radio.dispatchEvent(new CustomEvent("change")); } }); }; diff --git a/web/src/admin/sources/SourceWizard.ts b/web/src/admin/sources/SourceWizard.ts index a60f205db..29bee2e42 100644 --- a/web/src/admin/sources/SourceWizard.ts +++ b/web/src/admin/sources/SourceWizard.ts @@ -38,7 +38,7 @@ export class InitialSourceWizardPage extends WizardPage { ?.querySelectorAll("input[type=radio]") .forEach((radio) => { if (radio.checked) { - this.host.isValid = true; + radio.dispatchEvent(new CustomEvent("change")); } }); }; diff --git a/web/src/admin/stages/StageWizard.ts b/web/src/admin/stages/StageWizard.ts index 728411150..b0e70274b 100644 --- a/web/src/admin/stages/StageWizard.ts +++ b/web/src/admin/stages/StageWizard.ts @@ -55,7 +55,7 @@ export class InitialStageWizardPage extends WizardPage { ?.querySelectorAll("input[type=radio]") .forEach((radio) => { if (radio.checked) { - this.host.isValid = true; + radio.dispatchEvent(new CustomEvent("change")); } }); };