@@ -18,14 +18,15 @@ const renderChildren = (children: ChildElement[]) => {
18
18
if ( name === '' ) child . name = state . components [ typeId - 1 ] . name ;
19
19
// A DirectChildComponent is an instance of a top level component
20
20
// This component will render IndirectChild components (div/components rendered inside a child component)
21
- // Caret Start Removed style from prop drills so that styling isn't applied to canvas items
21
+ // Caret Start Removed style from prop drills so that styling isn't applied to canvas items.
22
+ // Also added keys & removed an unnecessary div around DirChildNestables that were causing errors.
22
23
if ( type === 'Component' ) {
23
24
return (
24
25
< DirectChildComponent
25
26
childId = { childId }
26
27
type = { type }
27
28
typeId = { typeId }
28
- key = { 'DirChildComp' + childId . toString ( ) + name }
29
+ key = { 'DirChildComp' + childId . toString ( ) + name + ( Math . random ( ) * 1000 ) . toString ( ) }
29
30
name = { name }
30
31
annotations = { annotations }
31
32
/>
@@ -39,7 +40,7 @@ const renderChildren = (children: ChildElement[]) => {
39
40
childId = { childId }
40
41
type = { type }
41
42
typeId = { typeId }
42
- key = { 'DirChildHTML' + childId . toString ( ) + name }
43
+ key = { 'DirChildHTML' + childId . toString ( ) + name + ( Math . random ( ) * 1000 ) . toString ( ) }
43
44
name = { name }
44
45
annotations = { annotations }
45
46
/>
@@ -48,17 +49,16 @@ const renderChildren = (children: ChildElement[]) => {
48
49
// Caret Added Orderedlists, Unorderedlists, and Menus, changed lists to nestable because they are nestable.
49
50
// child is a nestable type of HTML element (divs and forms)
50
51
else if ( type === 'HTML Element' && ( typeId === 11 || typeId === 2 || typeId === 3 || typeId === 14 || typeId === 15 || typeId === 16 ) ) {
51
- return ( < div >
52
+ return (
52
53
< DirectChildHTMLNestable
53
54
childId = { childId }
54
55
type = { type }
55
56
typeId = { typeId }
56
57
children = { children }
57
- key = { 'DirChildHTMLNest' + childId . toString ( ) + name }
58
+ key = { 'DirChildHTMLNest' + childId . toString ( ) + name + ( Math . random ( ) * 1000 ) . toString ( ) }
58
59
name = { name }
59
60
annotations = { annotations }
60
61
/>
61
- </ div >
62
62
) ;
63
63
}
64
64
else if ( type === 'HTML Element' && typeId === 1000 ) {
@@ -68,7 +68,7 @@ const renderChildren = (children: ChildElement[]) => {
68
68
type = { type }
69
69
typeId = { typeId }
70
70
children = { children }
71
- key = { 'DirChildHTMLNest ' + childId . toString ( ) + name }
71
+ key = { 'SeparatorChild ' + childId . toString ( ) + name + ( Math . random ( ) * 1000 ) . toString ( ) }
72
72
name = { name }
73
73
/>
74
74
) ;
@@ -82,7 +82,7 @@ const renderChildren = (children: ChildElement[]) => {
82
82
type = { type }
83
83
typeId = { typeId }
84
84
children = { children }
85
- key = { 'RouteLink' + childId . toString ( ) + name }
85
+ key = { 'RouteLink' + childId . toString ( ) + name + ( Math . random ( ) * 1000 ) . toString ( ) }
86
86
name = { name }
87
87
/>
88
88
) ;
0 commit comments