Skip to content

Commit

Permalink
[fix] Selection in Trees in stories
Browse files Browse the repository at this point in the history
  • Loading branch information
amivanoff committed Dec 31, 2021
1 parent b7c31ed commit 8104f03
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/data-controls/TreeRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export const TreeRenderer: React.FC<any> = (props) => {
/>
<Tree
selectedKeys={selectedKey}
draggable
draggable={{ icon: false }}
onExpand={onExpand}
expandedKeys={expandedKeys}
autoExpandParent={autoExpandParent}
Expand Down
1 change: 1 addition & 0 deletions stories/QueryTreeTableArtifacts.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ const viewKinds = [
//from: 'selector', // inner UI component variable name in case it has several variables? e.g. drag, moveX/moveY, width/height?
toObj: 'rm:Artifacts_Coll_Cond',
toProp: 'assetFolder',
fromProp: '@id',
},
],
},
Expand Down
4 changes: 3 additions & 1 deletion stories/TreeTableFormMktp.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ const viewKinds = [
title: 'WildBerries',
treeNodeTitleKey: 'name',
treeNodeParentKey: 'SubcatInCatLink',
connections: [{ toObj: 'mktp:ProductCards_in_Category_Coll_Ent0_con', toProp: 'CardInCatLink' }],
connections: [
{ toObj: 'mktp:ProductCards_in_Category_Coll_Ent0_con', toProp: 'CardInCatLink', fromProp: '@id' },
],
},
},
{
Expand Down
12 changes: 10 additions & 2 deletions stories/TwoTables.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ const viewKinds = [
title: 'WildBerries',
treeNodeTitleKey: 'name',
treeNodeParentKey: 'SubcatInCatLink',
connections: [{ toObj: 'mktp:ProductCards_in_Category_Coll_Ent0_con', toProp: 'CardInCatLink' }],
connections: [
{
toObj: 'mktp:ProductCards_in_Category_Coll_Ent0_con',
toProp: 'CardInCatLink',
fromProp: '@id',
},
],
},
},
{
Expand Down Expand Up @@ -629,7 +635,9 @@ const viewKinds = [
title: 'Продукты',
treeNodeTitleKey: 'title',
treeNodeParentKey: 'SubProdInProdLink',
connections: [{ toObj: 'mktp:ProductCards_in_Product_Coll_Ent0_Cond', toProp: 'CardInProdLink' }],
connections: [
{ toObj: 'mktp:ProductCards_in_Product_Coll_Ent0_Cond', toProp: 'CardInProdLink', fromProp: '@id' },
],
},
},
],
Expand Down
8 changes: 6 additions & 2 deletions stories/TwoTablesBig.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ const viewKinds = [
title: 'Категории маркетплейса',
treeNodeTitleKey: 'name',
treeNodeParentKey: 'SubcatInCatLink',
connections: [{ toObj: 'mktp:ProductCards_in_Category_Coll_Ent_con', toProp: 'CardInCatLink' }],
connections: [
{ toObj: 'mktp:ProductCards_in_Category_Coll_Ent_con', toProp: 'CardInCatLink', fromProp: '@id' },
],
},
},
{
Expand Down Expand Up @@ -619,7 +621,9 @@ const viewKinds = [
title: 'Продукты',
treeNodeTitleKey: 'title',
treeNodeParentKey: 'SubProdInProdLink',
connections: [{ toObj: 'mktp:ProductCards_in_Product_Coll_Ent_Cond', toProp: 'CardInProdLink' }],
connections: [
{ toObj: 'mktp:ProductCards_in_Product_Coll_Ent_Cond', toProp: 'CardInProdLink', fromProp: '@id' },
],
},
},
],
Expand Down

0 comments on commit 8104f03

Please sign in to comment.