mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-10 15:32:05 -03:30
value can also be a string when using default value (#39202)
fixes: #38964 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
parent
68096ee27e
commit
ab1c781601
@ -49,6 +49,13 @@ export const ClientSelect = ({
|
||||
defaultValue: defaultValue || "",
|
||||
});
|
||||
|
||||
const getValue = (): string[] => {
|
||||
if (typeof value === "string") {
|
||||
return [value];
|
||||
}
|
||||
return value || [];
|
||||
};
|
||||
|
||||
useFetch(
|
||||
() => {
|
||||
const params: ClientQuery = {
|
||||
@ -66,7 +73,7 @@ export const ClientSelect = ({
|
||||
|
||||
useFetch(
|
||||
() => {
|
||||
const values = ((value as string[]) || []).map(async (clientId) => {
|
||||
const values = getValue().map(async (clientId) => {
|
||||
if (clientKey === "clientId") {
|
||||
return (await adminClient.clients.find({ clientId }))[0];
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user