Override when already set with default (#2283)
This commit is contained in:
parent
5a0a84f724
commit
f3798324a3
1 changed files with 4 additions and 0 deletions
|
@ -53,6 +53,7 @@ import { UserProfileTab } from "./user-profile/UserProfileTab";
|
|||
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
||||
import { ClientPoliciesTab, toClientPolicies } from "./routes/ClientPolicies";
|
||||
import { KeysTab } from "./keys/KeysTab";
|
||||
import { DEFAULT_LOCALE } from "../i18n";
|
||||
|
||||
type RealmSettingsHeaderProps = {
|
||||
onChange: (value: boolean) => void;
|
||||
|
@ -186,6 +187,9 @@ export const RealmSettingsTabs = ({
|
|||
|
||||
const setupForm = (r: RealmRepresentation = realm) => {
|
||||
convertToFormValues(r, setValue);
|
||||
if (r.supportedLocales?.length === 0) {
|
||||
setValue("supportedLocales", [DEFAULT_LOCALE]);
|
||||
}
|
||||
resetForm(getValues());
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue