add stringify
for custom idp (#22699)
This commit is contained in:
parent
71fa95721d
commit
6830735ed9
3 changed files with 16 additions and 4 deletions
|
@ -44,12 +44,18 @@ export const MultiLineInput = ({
|
|||
});
|
||||
|
||||
const fields = useMemo<string[]>(() => {
|
||||
let values = stringify ? stringToMultiline(value as string) : value;
|
||||
let values = stringify
|
||||
? stringToMultiline(
|
||||
Array.isArray(value) && value.length === 1 ? value[0] : value,
|
||||
)
|
||||
: value;
|
||||
|
||||
values =
|
||||
Array.isArray(values) && values.length !== 0
|
||||
? values
|
||||
: defaultValue || [""];
|
||||
: (stringify
|
||||
? stringToMultiline(defaultValue as string)
|
||||
: defaultValue) || [""];
|
||||
|
||||
return values;
|
||||
}, [value]);
|
||||
|
|
|
@ -92,7 +92,10 @@ export default function AddIdentityProvider() {
|
|||
<FormProvider {...form}>
|
||||
<GeneralSettings id={providerId} />
|
||||
{providerInfo && (
|
||||
<DynamicComponents properties={providerInfo.properties} />
|
||||
<DynamicComponents
|
||||
stringify
|
||||
properties={providerInfo.properties}
|
||||
/>
|
||||
)}
|
||||
</FormProvider>
|
||||
<ActionGroup>
|
||||
|
|
|
@ -340,7 +340,10 @@ export default function DetailSettings() {
|
|||
<>
|
||||
<GeneralSettings create={false} id={alias} />
|
||||
{providerInfo && (
|
||||
<DynamicComponents properties={providerInfo.properties} />
|
||||
<DynamicComponents
|
||||
stringify
|
||||
properties={providerInfo.properties}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
|
Loading…
Reference in a new issue