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

Sider收起时,Sider里面的组件内容怎么保持之前的状态? #1803

Closed
jolinlizhihua opened this issue Jul 7, 2018 · 2 comments

Comments

@jolinlizhihua
Copy link

jolinlizhihua commented Jul 7, 2018

我的Sider里面有一个Tree,开始将Tree展开并选中了一些选项,当把Sider组件收起再次打开Sider的时候,之前的Tree就收起来了,选中的选项也不再了,请问怎么解决?如下图所示:
选中Tree的一些选项
1
将Sider收起再次打开时 Tree组件恢复到了原始的状态
2

@ant-design-bot
Copy link

Translation of this issue:


Sider, how to maintain the previous state of the component content inside the Sider?

There is a Tree in my Sider. I started to expand the Tree and selected some options. When the Sider component is closed and the Sider is opened again, the previous Tree is closed, and the selected option is no longer. How can I solve it? As shown below
2
1

@chenshuai2144
Copy link
Collaborator

最简单的办法,是做成一个受控组件。

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

No branches or pull requests

3 participants