Almost done with UserProfileFormField.tsx

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

View File

@ -548,6 +548,13 @@ export type Attribute = {
inputTypeRows?: `${number}`;
inputTypeMaxlength?: `${number}`;
inputHelperTextBefore?: string;
inputHelperTextAfter?: string;
inputTypePlaceholder?: string;
inputTypePattern?: string;
inputTypeMinlength?: `${number}`;
inputTypeMax?: string;
inputTypeMin?: string;
inputTypeStep?: string;
};
multivalued?: boolean;
autocomplete?:

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",