Almost done with UserProfileFormField.tsx

This commit is contained in:
Joseph Garrone
2024-05-05 20:58:27 +02:00
parent 3f1316183d
commit b4d924adfa
2 changed files with 9 additions and 1 deletions

View File

@ -405,7 +405,8 @@ function InputTag(props: PropsOfInputFiledByType & { fieldIndex: number | undefi
max={attribute.annotations.inputTypeMax}
min={attribute.annotations.inputTypeMin}
step={attribute.annotations.inputTypeStep}
//{...Object.fromEntries(Object.entries(props.attribute.html5DataAnnotations).map(([key, value]) => [`data-${key}`, value])}
// NOTE: The `?? {}` is for backward compatibility with Keycloak prior to 24
{...Object.fromEntries(Object.entries(attribute.html5DataAnnotations ?? {}).map(([key, value]) => [`data-${key}`, value]))}
onChange={event =>
formValidationDispatch({
"action": "update",