diff --git a/mscr-ui/src/common/components/schema-info/index.tsx b/mscr-ui/src/common/components/schema-info/index.tsx index ef574a6f7..637ea0bea 100644 --- a/mscr-ui/src/common/components/schema-info/index.tsx +++ b/mscr-ui/src/common/components/schema-info/index.tsx @@ -116,18 +116,17 @@ export default function SchemaInfo(props: { // Used by tree select and filtering function getAllNodeIdsOnPathToLeaf(nodeIds: string[]) { - const elementPaths: string[] = []; + let idsOnPath: string[] = []; nodeIds.forEach((nodeId) => { const nodes = nodeIdToNodeDictionary[nodeId]; - nodes.map((node) => elementPaths.push(node.elementPath)); + nodes.map((node) => { + idsOnPath = idsOnPath.concat(node.rootPathIds); + }); }); const nodesToSelect: Set = new Set(); - elementPaths.forEach((path) => { - const nodeIdsOnPath = path.split('.'); - nodeIdsOnPath.forEach((nodeId) => { - nodesToSelect.add(nodeId); - }); + idsOnPath.forEach((pathNodeId) => { + nodesToSelect.add(pathNodeId); }); return Array.from(nodesToSelect); diff --git a/mscr-ui/src/common/components/schema-info/schema-tree/node-info/index.tsx b/mscr-ui/src/common/components/schema-info/schema-tree/node-info/index.tsx index fd99692e7..a7400c67c 100644 --- a/mscr-ui/src/common/components/schema-info/schema-tree/node-info/index.tsx +++ b/mscr-ui/src/common/components/schema-info/schema-tree/node-info/index.tsx @@ -132,7 +132,6 @@ export default function NodeInfo(props: { )} {props.isNodeEditable && selectedNode && - selectedNode?.elementPath !== 'ROOT' && !isLeafNode && !props.hasCustomRoot && (