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组件的nzSelectedKeys值改变后没有取消上一次的选中状态 #5385

Closed
gaomengyong opened this issue Jun 5, 2020 · 1 comment

Comments

@gaomengyong
Copy link

Reproduction link

https://stackblitz.com/edit/angular-hfslgp

Steps to reproduce

先给nzSelectedKeys一个初始值
image
在setTimeout中给nzSelectedKeys设置一个新值
image

What is expected?

之前的选中状态取消

What is actually happening?

之前的还是选中状态
image

Environment Info
ng-zorro-antd 9.1.2
Browser Chrome
@zorro-bot
Copy link

zorro-bot bot commented Jun 5, 2020

Translation of this issue:

After nzSelectedKeys not change the value of the Tree component once checked on canceled

Reproduction link

Https://stackblitz.com/edit/angular-hfslgp

Steps to reproduce

Give an initial value nzSelectedKeys
! [Image] (https://user-images.githubusercontent.com/15724135/83874058-7daa3c00-a767-11ea-9a8a-335f29bc6e5d.png)
NzSelectedKeys to set a new value in the setTimeout
! [Image] (https://user-images.githubusercontent.com/15724135/83874100-8733a400-a767-11ea-9a92-183a2f661618.png)

What is expected?

Before the selected canceled

What is actually happening?

Before or selected
! [Image] (https://user-images.githubusercontent.com/15724135/83874132-9155a280-a767-11ea-9f73-29949ee07a2d.png)

Environment Info
Ng-zorro-antd 9.1.2
Browser Chrome

qiurenbo added a commit to qiurenbo/ng-zorro-antd that referenced this issue Jun 6, 2020
@vthinkxie vthinkxie removed their assignment Jun 11, 2020
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
…O#5431)

* fix(module: tree): fix nzCheckStrictly and selected keys bug

* fix(module: tree-select): fix wrong rendering with nzCheckable

* fix(module: tree-select): fix unnecessary codes

* fix(module: tree-select): fix node selection with nzCheckStrictly

close NG-ZORRO#5385, close NG-ZORRO#5195, close NG-ZORRO#5068
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

3 participants