NG-ZORRO/ng-zorro-antd

tree组件应该加一个可选属性,让树节点的点击事件与checkbox的change事件关联起来

Easyzhou opened this issue · 2 comments

Reproduction link

https://stackblitz.com/run?file=src%2Fapp%2Fapp.component.ts

Steps to reproduce

点击树组件的节点,无法同步选中该节点的checkbox组件

What is expected?

点击树节点的同时选中该组件的checkbox控件,应该加一个可选的属性用来关联此操作,不然无法满足用户,便捷操作checkbox选中的需求

What is actually happening?

点击树组件的节点,无法同步选中该节点的checkbox组件

Environment Info
ng-zorro-antd 13.2.2
Browser 所有浏览器

Translation of this issue:

TREE component should add a optional attribute, so that the clicks of the tree node are associated with the CHANGE event of Checkbox

REPRODUCTION LINK

[https://stackBlitz.com/run?file=src%2FAPPAPP.CONENENT.TS> //stackBlitz.com/run?file=src%2FAPPPPONENENTS)

STEPS To Reproduce

Click on the node of the tree component, you cannot synchronize the checkbox component of the node

What is exfected?

When you click on the tree node, select the Checkbox control of the component. You should add an optional attribute to associate this operation. Otherwise, it cannot meet the user.

What is actually happy?

Click on the node of the tree component, you cannot synchronize the checkbox component of the node

| ENVIRONMENT | Info |
| --- | --- | |
| NG-Zorro-ATD | 13.2.2 |
| Browser | All browsers |

I hope this message finds you well @vthinkxie

A node can have two different states: selected and checked. However, not every selected node should be checked, so the checkbox should remain unchecked. This is consistent with the behavior of Ant design's Tree component, which we are using as a reference. I agree that it would be convenient to have the option to check the node's checkbox by clicking on the node, but unfortunately, we cannot implement a feature that is not supported by the original source.