🚸 trigger null domain change if the user switches from another domain type to free domain option to prevent the modal from registering it as a valid value

This commit is contained in:
Fred KISSIE
2025-12-17 05:22:04 +01:00
parent 3ad4a76f03
commit d3d5a1c204
4 changed files with 47 additions and 31 deletions

View File

@@ -519,12 +519,15 @@ const AuthPageSettings = forwardRef<AuthPageSettingsRef, AuthPageSettingsProps>(
loginPage?.subdomain
}
onDomainChange={(res) => {
const selected = {
domainId: res.domainId,
subdomain: res.subdomain,
fullDomain: res.fullDomain,
baseDomain: res.baseDomain
};
const selected =
res === null
? null
: {
domainId: res.domainId,
subdomain: res.subdomain,
fullDomain: res.fullDomain,
baseDomain: res.baseDomain
};
setSelectedDomain(selected);
}}
/>