Skip to content
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]]在EditableProTable中添加子项,子项可以添加成功 不过添加的子项不能继续添加子项 parentKey不生效。 #4246

Closed
superAo005 opened this issue Dec 10, 2021 · 7 comments
Labels
⭕️ bug Something isn't working list

Comments

@superAo005
Copy link

superAo005 commented Dec 10, 2021

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

希望实现添加子项的功能,子项可以添加子项的子项 不过添加的子项不能继续添加子项 parentKey不生效。

刚刚接触EditableProTable,希望实现点击添加子项。但是无论是action?.addEditRecord还是EditableProTable.RecordCreator其中的parentKey都不生效,添加子项过后 添加的子项不能自己添加子项

📷 复现步骤

🏞 期望结果

在行后有“添加子项”按钮,点击后在该项下创建一个新的子项 新的子项可以继续添加子项

💻 复现代码

© 版本信息

  • ProComponents 版本: [e.g. 4.0.0]
  • umi 版本
  • 浏览器环境
  • 开发环境 [e.g. mac OS]

🚑 其他信息

附上我在codesandbox上的测试:
https://codesandbox.io/s/bian-ji-you-zi-lie-de-biao-ge-bb2c2?file=/App.tsx

image

@superAo005 superAo005 changed the title 🐛[BUG]]在EditableProTable中,希望实现添加子项的功能,子项可以添加成功 不过添加的子项不能继续添加子项 parentKey不生效。 🐛[BUG]]在EditableProTable中添加子项,子项可以添加成功 不过添加的子项不能继续添加子项 parentKey不生效。 Dec 10, 2021
@chenshuai2144
Copy link
Contributor

试了下你的demo是可以的。

@superAo005
Copy link
Author

大佬我的意思是 添加的子项可以继续添加子项的子项 也就是多层嵌套 目前是通过修改dataSource来实现

@chenshuai2144
Copy link
Contributor

只要key是对的,是可以的

@liushan-github
Copy link

无意中发现,把bottom改成top可行
image

image

@chenshuai2144 chenshuai2144 added list ⭕️ bug Something isn't working labels Dec 20, 2021
@agileago
Copy link

@chenshuai2144 postion: bottom 是二级子项不能再添加子项了

@dengrujie
Copy link

将@ant-design/pro-table和antd升级版最新版就可以了

@CodePirate7
Copy link

这个bug有进展吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭕️ bug Something isn't working list
Projects
None yet
Development

No branches or pull requests

6 participants