fix: Only show error state on components w/ errors for node validation (#3968)
* Only show error state on components w/ errors for node validation * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
d19c16462b
commit
e63c377283
1 changed files with 5 additions and 1 deletions
|
|
@ -471,7 +471,11 @@ Array<{ id: string; errors: Array<string> }> {
|
|||
];
|
||||
}
|
||||
// validateNode(n, edges) returns an array of errors for the node
|
||||
return nodes.map((n) => ({ id: n.id, errors: validateNode(n, edges) }));
|
||||
const nodeMap = nodes.map((n) => ({
|
||||
id: n.id,
|
||||
errors: validateNode(n, edges),
|
||||
}));
|
||||
return nodeMap.filter((n) => n.errors?.length);
|
||||
}
|
||||
|
||||
export function updateEdges(edges: Edge[]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue