only show the placeholder when the field isn't readonly (#32975)
fixes: #32657 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
parent
e999b8fd82
commit
1ca56e6dd9
1 changed files with 12 additions and 6 deletions
|
@ -17,12 +17,18 @@ export const TextComponent = (props: UserProfileFieldProps) => {
|
|||
id={attribute.name}
|
||||
data-testid={attribute.name}
|
||||
type={type}
|
||||
placeholder={label(
|
||||
placeholder={
|
||||
attribute.readOnly
|
||||
? ""
|
||||
: label(
|
||||
props.t,
|
||||
attribute.annotations?.["inputTypePlaceholder"] as string,
|
||||
attribute.name,
|
||||
attribute.annotations?.["inputOptionLabelsI18nPrefix"] as string,
|
||||
)}
|
||||
attribute.annotations?.[
|
||||
"inputOptionLabelsI18nPrefix"
|
||||
] as string,
|
||||
)
|
||||
}
|
||||
readOnly={attribute.readOnly}
|
||||
isRequired={isRequired}
|
||||
{...form.register(fieldName(attribute.name))}
|
||||
|
|
Loading…
Reference in a new issue