Skip to content

Commit 8104f03

Browse files
committed
[fix] Selection in Trees in stories
1 parent b7c31ed commit 8104f03

5 files changed

+21
-6
lines changed

src/data-controls/TreeRenderer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export const TreeRenderer: React.FC<any> = (props) => {
263263
/>
264264
<Tree
265265
selectedKeys={selectedKey}
266-
draggable
266+
draggable={{ icon: false }}
267267
onExpand={onExpand}
268268
expandedKeys={expandedKeys}
269269
autoExpandParent={autoExpandParent}

stories/QueryTreeTableArtifacts.stories.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ const viewKinds = [
261261
//from: 'selector', // inner UI component variable name in case it has several variables? e.g. drag, moveX/moveY, width/height?
262262
toObj: 'rm:Artifacts_Coll_Cond',
263263
toProp: 'assetFolder',
264+
fromProp: '@id',
264265
},
265266
],
266267
},

stories/TreeTableFormMktp.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ const viewKinds = [
183183
title: 'WildBerries',
184184
treeNodeTitleKey: 'name',
185185
treeNodeParentKey: 'SubcatInCatLink',
186-
connections: [{ toObj: 'mktp:ProductCards_in_Category_Coll_Ent0_con', toProp: 'CardInCatLink' }],
186+
connections: [
187+
{ toObj: 'mktp:ProductCards_in_Category_Coll_Ent0_con', toProp: 'CardInCatLink', fromProp: '@id' },
188+
],
187189
},
188190
},
189191
{

stories/TwoTables.stories.tsx

+10-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,13 @@ const viewKinds = [
178178
title: 'WildBerries',
179179
treeNodeTitleKey: 'name',
180180
treeNodeParentKey: 'SubcatInCatLink',
181-
connections: [{ toObj: 'mktp:ProductCards_in_Category_Coll_Ent0_con', toProp: 'CardInCatLink' }],
181+
connections: [
182+
{
183+
toObj: 'mktp:ProductCards_in_Category_Coll_Ent0_con',
184+
toProp: 'CardInCatLink',
185+
fromProp: '@id',
186+
},
187+
],
182188
},
183189
},
184190
{
@@ -629,7 +635,9 @@ const viewKinds = [
629635
title: 'Продукты',
630636
treeNodeTitleKey: 'title',
631637
treeNodeParentKey: 'SubProdInProdLink',
632-
connections: [{ toObj: 'mktp:ProductCards_in_Product_Coll_Ent0_Cond', toProp: 'CardInProdLink' }],
638+
connections: [
639+
{ toObj: 'mktp:ProductCards_in_Product_Coll_Ent0_Cond', toProp: 'CardInProdLink', fromProp: '@id' },
640+
],
633641
},
634642
},
635643
],

stories/TwoTablesBig.stories.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ const viewKinds = [
221221
title: 'Категории маркетплейса',
222222
treeNodeTitleKey: 'name',
223223
treeNodeParentKey: 'SubcatInCatLink',
224-
connections: [{ toObj: 'mktp:ProductCards_in_Category_Coll_Ent_con', toProp: 'CardInCatLink' }],
224+
connections: [
225+
{ toObj: 'mktp:ProductCards_in_Category_Coll_Ent_con', toProp: 'CardInCatLink', fromProp: '@id' },
226+
],
225227
},
226228
},
227229
{
@@ -619,7 +621,9 @@ const viewKinds = [
619621
title: 'Продукты',
620622
treeNodeTitleKey: 'title',
621623
treeNodeParentKey: 'SubProdInProdLink',
622-
connections: [{ toObj: 'mktp:ProductCards_in_Product_Coll_Ent_Cond', toProp: 'CardInProdLink' }],
624+
connections: [
625+
{ toObj: 'mktp:ProductCards_in_Product_Coll_Ent_Cond', toProp: 'CardInProdLink', fromProp: '@id' },
626+
],
623627
},
624628
},
625629
],

0 commit comments

Comments
 (0)