keep default value a string when stringify (#31597)

fixes: #31480

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-07-25 12:20:37 +02:00 committed by GitHub
parent 01f5747eed
commit eea1d10e23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,7 +42,9 @@ export const MultiValuedListComponent = ({
<Controller
name={convertToName(name!)}
control={control}
defaultValue={defaultValue ? [defaultValue] : []}
defaultValue={
stringify ? defaultValue || "" : defaultValue ? [defaultValue] : []
}
render={({ field }) => (
<KeycloakSelect
toggleId={name}