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]getHalfCheckedNodeList can not get the nodes #2205

Closed
DoesntWong opened this issue Sep 28, 2018 · 4 comments
Closed

[Tree]getHalfCheckedNodeList can not get the nodes #2205

DoesntWong opened this issue Sep 28, 2018 · 4 comments

Comments

@DoesntWong
Copy link

Version

1.6.0

Environment

Angular6

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-1tpsiy

Steps to reproduce

Initialize nzCheckStrictly is true,then change to false.
Uncheck 0-0-0-0,click on the button to get halfCheckedNodeList,console print halfCheckedNodeList is []

What is expected?

I want to get 0-0 and 0-0-0 node

What is actually happening?

halfCheckedNodeList is []

Other?

@DoesntWong DoesntWong changed the title getHalfCheckedNodeList can not get the nodes [Tree]getHalfCheckedNodeList can not get the nodes Sep 28, 2018
@DoesntWong
Copy link
Author

有没有一种方法,获取所有勾选,半选?

@DoesntWong
Copy link
Author

这个BUG大概什么时候可以解决?我想要的效果是, nzCheckStrictly 是 true 的时候,点击父节点,也可以勾选所有子节点。
或者nzCheckStrictly 是 false 的时候,全勾选时能获取到所有勾选的节点,而不是只能获取到一个父节点,因为业务上需要传所有勾选的节点id才能实现功能权限的控制。谢谢

@simplejason
Copy link
Member

@DoesntWong 你可以在nzCheckStrictly=false时,将返回的nzTreeNode数组遍历,取出全部节点和子节点ID

@DoesntWong
Copy link
Author

@simplejason 这样是可以获取,可是回显的时候必须要 nzCheckStrictly=true,这样就会出现这个BUG,我获取不到 halfCheckedNode

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

No branches or pull requests

2 participants