Skip to content

Commit d051d34

Browse files
committed
Remove reversing children in entity diagram
1 parent a8e65dd commit d051d34

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

packages/libs/eda/src/lib/core/components/EntityDiagram.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,7 @@ interface Props {
2626
export function EntityDiagram(props: Props) {
2727
const { selectedEntity, selectedVariable, variableLinkConfig } = props;
2828
const studyMetadata = useStudyMetadata();
29-
const entityTree = useMemo((): StudyEntity => {
30-
return mapStructure(
31-
(node, children) => ({
32-
...node,
33-
children: children.slice().reverse(),
34-
}),
35-
(entity) => entity.children ?? [],
36-
studyMetadata.rootEntity
37-
);
38-
}, [studyMetadata.rootEntity]);
29+
const entityTree = studyMetadata.rootEntity;
3930
const [lastVariableMap, setLastVariableMap] = useState<
4031
Record<string, string>
4132
>({});

0 commit comments

Comments
 (0)