Include missing errors from expressions UI.

This commit is contained in:
orangemug 2020-02-17 13:41:11 +00:00
parent 39333953d7
commit 35098111ac

View file

@ -62,7 +62,18 @@ export default class ExpressionProperty extends React.Component {
</> </>
); );
const error = errors[fieldType+"."+fieldName]; const fieldError = errors[fieldType+"."+fieldName];
const errorKeyStart = `${fieldType}.${fieldName}[`;
const foundErrors = Object.entries(errors).filter(([key, error]) => {
return key.startsWith(errorKeyStart);
});
let message = foundErrors.map(([key, error]) => {
return error.message;
}).join("");
if (fieldError) {
message = fieldError.message + message;
}
const error = message ? {message} : undefined;
return <InputBlock return <InputBlock
error={error} error={error}