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]Tree组件在切换数据后,属性定义defaultExpandAll={true}会失效,建议增加受控状态下的expandAll #2660

Open
Patrick9527 opened this issue Jan 29, 2021 · 1 comment
Assignees
Labels
❓ Usage It's about how it works

Comments

@Patrick9527
Copy link

Component

Tree

Feature Description

Tree组件在切换数据后,属性定义defaultExpandAll={true}会失效,建议增加受控状态下的expandAll
riddle复现demo
https://riddle.alibaba-inc.com/riddles/433f2ce7

@YunMeng99 YunMeng99 added the 💡 Feature Request New feature or request label Aug 15, 2023
@YSMJ1994 YSMJ1994 added ❓ Usage It's about how it works and removed 💡 Feature Request New feature or request labels Mar 14, 2024
@YSMJ1994
Copy link
Contributor

defaultExpandAll 行为类似 defaultValue,仅在组件首次渲染会执行,你的场景可以在数据变化时传递一个不同的 key 让 react 渲染一个新的组件来实现。
若有受控的expandAll,会阻塞用户交互,可以通过传递 expandedKeys 来达到类似效果

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ Usage It's about how it works
Projects
None yet
Development

No branches or pull requests

4 participants