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

TreeSelect如何设置只能选中叶子节点,当点击非叶子节点时,只是展开其子节点 #3833

Closed
charlee2025 opened this issue Jul 20, 2019 · 2 comments
Assignees

Comments

@charlee2025
Copy link

Reproduction link

https://stackblitz.com/edit/angular-3uuec8?file=src/app/app.component.ts

Steps to reproduce

点击非叶子节点,目前是直接选中,并关闭树

What is expected?

1.点击非叶子节点,展开其子节点
2.点击叶子节点,选中

What is actually happening?

点击非叶子节点,目前是直接选中,并关闭树

Environment Info
ng-zorro-antd 8.1.0
Browser 360浏览器和chrome浏览器
@zorro-bot
Copy link

zorro-bot bot commented Jul 20, 2019

Translation of this issue:

How to set TreeSelect can only select leaf nodes, when clicking non-leaf nodes, just expand its child nodes

Reproduction link

[https://stackblitz.com/edit/angular-3uuec8?file=src/app/app.component.ts](https://stackblitz.com/edit/angular-3uuec8?file=src/app/app. Component.ts)

Steps to reproduce

Click on the non-leaf node, currently select directly and close the tree

What is expected?

  1. Click on the non-leaf node to expand its child nodes
  2. Click on the leaf node and select

What is actually happening?

Click on the non-leaf node, currently select directly and close the tree

Environment Info
ng-zorro-antd 8.1.0
Browser 360 Browser and Chrome Browser

@wzhudev
Copy link
Member

wzhudev commented Jul 21, 2019

@hsuanxyz 对于这种 case,bot 需要优化一下

hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Jul 22, 2019
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
NG-ZORRO#3843)

* fix(module:tree-select): should not close when the selectable is false

close NG-ZORRO#3833

* test(module:tree-select): test getter
hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
NG-ZORRO#3843)

* fix(module:tree-select): should not close when the selectable is false

close NG-ZORRO#3833

* test(module:tree-select): test getter
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