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

Tree 组件 defaultExpandAll 与 loadData 同时存在时,怎么屏蔽默认的 loadData 事件? #19212

Closed
1 task
Benpaodejiezai opened this issue Oct 14, 2019 · 6 comments
Assignees
Labels

Comments

@Benpaodejiezai
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

设置展开全部节点,直接就执行 loadData

What is expected?

正常展开节点,不执行 loadData

What is actually happening?

默认执行了 loadData

Environment Info
antd 3.23.6
React 16.9.0
System macos
Browser chrome
@Benpaodejiezai
Copy link
Author

返回节点太多了,每个都执行 loadData 浏览器直接卡死,有什么好的解决办法吗?

@zombieJ
Copy link
Member

zombieJ commented Oct 14, 2019

loadedKeys 控制加载。

@ant-design-bot
Copy link
Contributor

Hello @Benpaodejiezai, we use GitHub issues to trace bugs or discuss plans of Ant Design. So, please don't ask usage questions here. You can try to ask questions on Stack Overflow or Segment Fault, then apply tag antd and react to your question.

你好 @Benpaodejiezai,Ant Design Issue 板块是用于 bug 反馈与需求讨论的地方。请勿询问如何使用的问题,你可以试着在 Stack Overflow 或者 Segment Fault 中提问(记得添加 antdreact 标签哦~)。

@Benpaodejiezai
Copy link
Author

loadedKeys 控制加载。

使用 loadedKeys 控制,节点就不能 loadData 我希望的是,节点依旧可以 loadData ,但不是在初始化的时候,而是在我点击它的时候

@yoyo837
Copy link
Contributor

yoyo837 commented Oct 14, 2019

那你根节点呢?一开始留白?

@zombieJ
Copy link
Member

zombieJ commented Oct 14, 2019

点击的时候从 loadedKeys 去掉你要加载的 key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants