New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] field.insert 插入(非第一项和最后一项)内容后,path 内索引下标变成字符串 #4070
Comments
这个问题发生在 ArrayField 往数组中间insert的时候,向数组尾部添加不会触发该问题。 该 issue 中的 case 在 ArrayField 执行
formily/packages/core/src/shared/internals.ts Lines 399 to 407 in 4dc50bc
@janryWang 我尝试将 moveIndex 的返回改成 FormPath.parse(preStr).concat(index) , 但是会破坏 interface INodePatch 的声明,INodePath 中的address 都是字符串类型,白总看看这个能改成Pattern 类型吗,或者还是考虑别的解决办法?
|
Is there any update on this issue? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction link
Steps to reproduce
输出值
// 0 : ['array']
// 1: (2) ['array', 0]
// 2: (2) ['array', '2']
// 3: (2) ['array', 1]
What is expected?
// 0 : ['array']
// 1: (2) ['array', 0]
// 2: (2) ['array', 1]
// 3: (2) ['array', 2]
What is actually happening?
// 0 : ['array']
// 1: (2) ['array', 0]
// 2: (2) ['array', '2']
// 3: (2) ['array', 1]
Package
@formily/[email protected]
The text was updated successfully, but these errors were encountered: