mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Display form errors on new lines if there are multiple
This commit is contained in:
parent
288ce123ca
commit
33a699b8ae
@ -33,7 +33,17 @@ function FormSubmitError({ error }) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <Alert variant="danger" isInline title={errorMessage} />;
|
||||
return (
|
||||
<Alert
|
||||
variant="danger"
|
||||
isInline
|
||||
title={
|
||||
Array.isArray(errorMessage)
|
||||
? errorMessage.map(msg => <div key={msg}>{msg}</div>)
|
||||
: errorMessage
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default FormSubmitError;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user