Skip to content

Commit c8d80bb

Browse files
Tolga MizrakciTolga Mizrakci
authored andcommitted
added childComponentId in state
1 parent 6aa975a commit c8d80bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils/componentReducer.util.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export const addChild = (state, { title }) => {
7777

7878
const newChild = {
7979
childId: view.nextChildId.toString(),
80+
childComponentId: parentComponent.id,
8081
componentName: strippedTitle,
8182
position: {
8283
x: 110,
@@ -85,8 +86,8 @@ export const addChild = (state, { title }) => {
8586
height: 50
8687
},
8788
draggable: true,
88-
color: parentComponent.color,
89-
ancestors: [focusComponent]
89+
color: parentComponent.color
90+
// ancestors: [focusComponent]
9091
};
9192

9293
const compsChildrenArr = [...view.childrenArray, newChild];

0 commit comments

Comments
 (0)