Fix error rending
This commit is contained in:
parent
3dded16f0a
commit
c99d9ccbdd
@ -201,18 +201,15 @@ function FieldErrors(props: {
|
|||||||
<span
|
<span
|
||||||
id={`input-error-${attribute.name}${fieldIndex === undefined ? "" : `-${fieldIndex}`}`}
|
id={`input-error-${attribute.name}${fieldIndex === undefined ? "" : `-${fieldIndex}`}`}
|
||||||
className={getClassName("kcInputErrorMessageClass")}
|
className={getClassName("kcInputErrorMessageClass")}
|
||||||
style={{
|
|
||||||
"position": displayableErrors.length === 1 ? "absolute" : undefined
|
|
||||||
}}
|
|
||||||
aria-live="polite"
|
aria-live="polite"
|
||||||
>
|
>
|
||||||
{displayableErrors
|
{displayableErrors
|
||||||
.filter(error => error.fieldIndex === fieldIndex)
|
.filter(error => error.fieldIndex === fieldIndex)
|
||||||
.map(({ errorMessage }, i, arr) => (
|
.map(({ errorMessage }, i, arr) => (
|
||||||
<>
|
<Fragment key={i}>
|
||||||
<span key={i}>{errorMessage}</span>
|
<span key={i}>{errorMessage}</span>
|
||||||
{arr.length - 1 !== i && <br />}
|
{arr.length - 1 !== i && <br />}
|
||||||
</>
|
</Fragment>
|
||||||
))}
|
))}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user