NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.8k stars 3.85k forks source link

tree-view 创建的node只会在ngOninit中别定义一次isLeaf, 如果我在下增加chlidren,并不会重新渲染 #8600

Open Libohan12 opened 1 week ago

Libohan12 commented 1 week ago

Reproduction link

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

Steps to reproduce

在文件 tree-view/node.ts ngOninit中 this.isLeaf = !this.tree.treeControl.isExpandable(this.data); 只会被判断一次

What is expected?

如果数据发生变更,需要重新定义是否可以展开

What is actually happening?

只会被判断一次

Environment Info
ng-zorro-antd 17.4.1
Browser chrome 126
zorro-bot[bot] commented 1 week ago

Translation of this issue:

Node created by Tree-View will only define Isleaf once in ngginit. If I add Chlidren downward, it will not re-renders renewal

REPRODUCTION LINK

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

STEPS To Reproduce

File TREE-VIEW/Node.TS NGONINIT This.isLeaf =! This.Tree.TreeControl.isexpandable (this.data); Will only be judged once

What is exfected?

If the data changes, you need to redefine whether it can be expanded

What is actually happy?

Will only be judged once

ENVIRONMENT Info
NG-Zorro-ATD 17.4.1
Browser Chrome 126