Use correct default for 'Truststore SPI' (#980)

This commit is contained in:
Jon Koops 2021-08-11 07:52:12 +02:00 committed by GitHub
parent 9849c87270
commit dbedd79883
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -165,8 +165,8 @@ export const LdapSettingsConnection = ({
>
<Controller
name="config.useTruststoreSpi[0]"
defaultValue=""
control={form.control}
defaultValue="ldapsOnly"
render={({ onChange, value }) => (
<Select
toggleId="kc-use-truststore-spi"
@ -175,21 +175,14 @@ export const LdapSettingsConnection = ({
}
isOpen={isTruststoreSpiDropdownOpen}
onSelect={(_, value) => {
onChange(value as string);
onChange(value.toString());
setIsTruststoreSpiDropdownOpen(false);
}}
selections={value}
variant={SelectVariant.single}
>
<SelectOption key={0} value="always">
{t("always")}
</SelectOption>
<SelectOption key={1} value="ldapsOnly">
{t("onlyLdaps")}
</SelectOption>
<SelectOption key={2} value="never">
{t("never")}
</SelectOption>
<SelectOption value="always">{t("always")}</SelectOption>
<SelectOption value="ldapsOnly">{t("onlyLdaps")}</SelectOption>
<SelectOption value="never">{t("never")}</SelectOption>
</Select>
)}
></Controller>