From b0df9bc85e1a4cf2258baea8d7e41a80606bd160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E7=91=9C?= Date: Sun, 8 May 2022 14:41:01 +0800 Subject: [PATCH 1/2] fix(PathSelector):problem about PathSelector which gets the wrong ArrayDepth --- formily/setters/src/components/ReactionsSetter/PathSelector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formily/setters/src/components/ReactionsSetter/PathSelector.tsx b/formily/setters/src/components/ReactionsSetter/PathSelector.tsx index 369fa7d5b..eecbf589f 100644 --- a/formily/setters/src/components/ReactionsSetter/PathSelector.tsx +++ b/formily/setters/src/components/ReactionsSetter/PathSelector.tsx @@ -52,7 +52,7 @@ const transformDataSource = (node: TreeNode) => { const transformRelativePath = (arrayNode: TreeNode, targetNode: TreeNode) => { if (targetNode.depth === currentNode.depth) return `.${targetNode.props.name || targetNode.id}` - return `${dots(currentNode.depth - arrayNode.depth)}[].${targetPath( + return `${dots(currentNode.depth - targetNode.depth)}[].${targetPath( arrayNode, targetNode )}` From 7093770085788bffcfa6f9fd84f55d771b471b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E7=91=9C?= Date: Sun, 8 May 2022 16:24:20 +0800 Subject: [PATCH 2/2] fix(PathSelector):problem about PathSelector which gets the wrong ArrayDepth --- formily/setters/src/components/ReactionsSetter/PathSelector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formily/setters/src/components/ReactionsSetter/PathSelector.tsx b/formily/setters/src/components/ReactionsSetter/PathSelector.tsx index eecbf589f..d5f615240 100644 --- a/formily/setters/src/components/ReactionsSetter/PathSelector.tsx +++ b/formily/setters/src/components/ReactionsSetter/PathSelector.tsx @@ -52,7 +52,7 @@ const transformDataSource = (node: TreeNode) => { const transformRelativePath = (arrayNode: TreeNode, targetNode: TreeNode) => { if (targetNode.depth === currentNode.depth) return `.${targetNode.props.name || targetNode.id}` - return `${dots(currentNode.depth - targetNode.depth)}[].${targetPath( + return `${dots(targetNode.depth)}[].${targetPath( arrayNode, targetNode )}`