set default for allowCreate and readonly for select (#2034)

fixes: #1939
This commit is contained in:
Erik Jan de Wit 2022-02-17 15:42:35 +01:00 committed by GitHub
parent ebeceefcbf
commit 6427a15d1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -30,7 +30,7 @@ export default function AddSamlConnect() {
const id = "saml"; const id = "saml";
const form = useForm<DiscoveryIdentityProvider>({ const form = useForm<DiscoveryIdentityProvider>({
defaultValues: { alias: id }, defaultValues: { alias: id, config: { allowCreate: "true" } },
}); });
const { const {
handleSubmit, handleSubmit,

View file

@ -156,6 +156,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
}} }}
selections={value} selections={value}
variant={SelectVariant.single} variant={SelectVariant.single}
isDisabled={readOnly}
> >
<SelectOption <SelectOption
data-testid="persistent-option" data-testid="persistent-option"
@ -236,6 +237,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
}} }}
selections={value} selections={value}
variant={SelectVariant.single} variant={SelectVariant.single}
isDisabled={readOnly}
> >
<SelectOption <SelectOption
data-testid="subjectNameId-option" data-testid="subjectNameId-option"
@ -340,6 +342,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
}} }}
selections={value} selections={value}
variant={SelectVariant.single} variant={SelectVariant.single}
isDisabled={readOnly}
> >
<SelectOption value="RSA_SHA1" /> <SelectOption value="RSA_SHA1" />
<SelectOption value="RSA_SHA256" isPlaceholder /> <SelectOption value="RSA_SHA256" isPlaceholder />
@ -378,6 +381,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
}} }}
selections={value} selections={value}
variant={SelectVariant.single} variant={SelectVariant.single}
isDisabled={readOnly}
> >
<SelectOption value="NONE" /> <SelectOption value="NONE" />
<SelectOption value={t("keyID")} isPlaceholder /> <SelectOption value={t("keyID")} isPlaceholder />