-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 设置选中节点是否为叶子结点,出现问题 #4037
Comments
Translation of this issue:Tree Sets whether the selected node is a leaf node, and there is a problem.Reproduction link[https://stackblitz.com/edit/angular-bjj7fm?file=src/app/app.component.ts](https://stackblitz.com/edit/angular-bjj7fm?file=src/app/app. Component.ts) Steps to reproduceAfter setting nzTree's nzClick, get the click node assignment to this.activedNode and set this.activedNode.isLeaf = isLeaf; the node has not changed. What is expected?this.activedNode.isLeaf = isLeaf; is valid What is actually happening?this.activedNode.isLeaf = isLeaf; does not take effect
In the example, clicking the button does not respond, if you change the code: setTreeisLeaf(isLeaf) {
this.activedNode.isLeaf = isLeaf;
// this.activedNode.title = ( new Date()) '';
} Open the comment code and click again to do it. |
Reproduction link
https://stackblitz.com/edit/angular-bjj7fm?file=src/app/app.component.ts
Steps to reproduce
设置nzTree的nzClick后拿到点击节点赋值给this.activedNode,设置this.activedNode.isLeaf = isLeaf;节点并没有改变。
但是如果在后面改变 this.activedNode.title = ( new Date()) ''; 节点文本,isLeaf 也生效了。
What is expected?
this.activedNode.isLeaf = isLeaf;是可以生效的
What is actually happening?
this.activedNode.isLeaf = isLeaf;并没有生效
例子中点击按钮并没有反应,如果改变代码:
打开注释代码,再次点击就能实现。
The text was updated successfully, but these errors were encountered: