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

nz-tree 如果设置某个节点的checked为true时,刚好这个节点拥有子节点,那么这个节点的所以子节点都会被选中,强制设置其子节点checked为false都不管用 #2655

Closed
isfong opened this issue Dec 18, 2018 · 2 comments
Assignees

Comments

@isfong
Copy link

isfong commented Dec 18, 2018

Version

7.0.0-rc.1

Environment

linux

Reproduction link

[https://stackblitz.com/edit/angular-igexfk-qbb24v]
(https://stackblitz.com/edit/angular-igexfk-qbb24v)

Steps to reproduce

重现链接查看

What is expected?

希望只是按照nodes 的真实属性进行设置是否checked,如果需要在需要数据回显的需求下 根本没法办到回显那些被勾选了哪些没有勾选

What is actually happening?

重现链接查看

Other?

@cnfanhua
Copy link

我也遇到过这个问题。
现在使用以下组合的方式来选中节点,不知道还有没有其它解决方案。
[nzCheckStrictly]="true"
[nzCheckedKeys] = "defaultSelectedKeys"

@isfong
Copy link
Author

isfong commented Dec 26, 2018

我也遇到过这个问题。
现在使用以下组合的方式来选中节点,不知道还有没有其它解决方案。
[nzCheckStrictly]="true"
[nzCheckedKeys] = "defaultSelectedKeys"
我已经放弃了checked属性,使用selected属性来代替,暂时能满足需求,等于是舍弃了checkebox

Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
…Node (NG-ZORRO#2976)

refactor(module: tree): fix bugs and add extra functions

refactor(module: tree): fix spec

refactor(module: tree): add doc

refactor(module: tree): fix doc

refactor(module: tree): support getTreeNodeByKey

close NG-ZORRO#1998 close NG-ZORRO#2370 close NG-ZORRO#2655 close NG-ZORRO#2724 close NG-ZORRO#2273 close NG-ZORRO#1399 close NG-ZORRO#2208 close NG-ZORRO#2384 NG-ZORRO#2375
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
…Node (NG-ZORRO#2976)

refactor(module: tree): fix bugs and add extra functions

refactor(module: tree): fix spec

refactor(module: tree): add doc

refactor(module: tree): fix doc

refactor(module: tree): support getTreeNodeByKey

close NG-ZORRO#1998 close NG-ZORRO#2370 close NG-ZORRO#2655 close NG-ZORRO#2724 close NG-ZORRO#2273 close NG-ZORRO#1399 close NG-ZORRO#2208 close NG-ZORRO#2384 NG-ZORRO#2375
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

4 participants