-
Notifications
You must be signed in to change notification settings - Fork 4k
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
nz-tree中首次设置[nzExpandAll]="true"展开,但nzData变动后不展开 #5446
Comments
Translation of this issue:nz-tree was first set [nzExpandAll] = "true" start, but does not change after the commencement of nzDataReproduction link[Https://stackblitz.com/edit/angular-q7lmud?file=src/app/app.component.ts](https://stackblitz.com/edit/angular-q7lmud?file=src/app/app. component.ts) Steps to reproduceI set a timer, update nzData value 5s, tree contraction, not expansion What is expected?Hope has been expanded state What is actually happening?It is contracted
|
@simplejason 您好,这个问题定为bug了,现在没有解决的方法是嘛? |
似乎问题是每次input改变expandAll都会被设置成false.
一个naive的解法就是把expandAll 变成component的local member这样状态就记住了。同时ngOnChanges也保证了第一次expandAll的设值顺序。 |
@yzhe554 您好 expandAll 设置为本地变量,在nzData变更时,还是会收缩。您提到的ngOnChanges我并没有使用,而是直接重置了nzData,和这个有关联嘛? |
Hi @peacejj,你是说你更改tree.component.ts之后还是有问题么?我并没有试过,不过从代码看是tree component的一个bug。任何input变化都会让expandAll重置成false |
nzCollapsed也有类似的问题 |
close NG-ZORRO#5976, close NG-ZORRO#5809, close NG-ZORRO#5739, close NG-ZORRO#5736, close NG-ZORRO#5519, close NG-ZORRO#5446, close NG-ZORRO#5152, close NG-ZORRO#4694, close NG-ZORRO#4472, close NG-ZORRO#3832, close NG-ZORRO#2785, close NG-ZORRO#2744
close NG-ZORRO#5976, close NG-ZORRO#5809, close NG-ZORRO#5739, close NG-ZORRO#5736, close NG-ZORRO#5519, close NG-ZORRO#5446, close NG-ZORRO#5152, close NG-ZORRO#4694, close NG-ZORRO#4472, close NG-ZORRO#3832, close NG-ZORRO#2785, close NG-ZORRO#2744
close NG-ZORRO#5976, close NG-ZORRO#5809, close NG-ZORRO#5739, close NG-ZORRO#5736, close NG-ZORRO#5519, close NG-ZORRO#5446, close NG-ZORRO#5152, close NG-ZORRO#4694, close NG-ZORRO#4472, close NG-ZORRO#3832, close NG-ZORRO#2785, close NG-ZORRO#2744
close NG-ZORRO#5976, close NG-ZORRO#5809, close NG-ZORRO#5739, close NG-ZORRO#5736, close NG-ZORRO#5519, close NG-ZORRO#5446, close NG-ZORRO#5152, close NG-ZORRO#4694, close NG-ZORRO#4472, close NG-ZORRO#3832, close NG-ZORRO#2785, close NG-ZORRO#2744
close NG-ZORRO#5976, close NG-ZORRO#5809, close NG-ZORRO#5739, close NG-ZORRO#5736, close NG-ZORRO#5519, close NG-ZORRO#5446, close NG-ZORRO#5152, close NG-ZORRO#4694, close NG-ZORRO#4472, close NG-ZORRO#3832, close NG-ZORRO#2785, close NG-ZORRO#2744
close NG-ZORRO#5976, close NG-ZORRO#5809, close NG-ZORRO#5739, close NG-ZORRO#5736, close NG-ZORRO#5519, close NG-ZORRO#5446, close NG-ZORRO#5152, close NG-ZORRO#4694, close NG-ZORRO#4472, close NG-ZORRO#3832, close NG-ZORRO#2785, close NG-ZORRO#2744
close NG-ZORRO#5976, close NG-ZORRO#5809, close NG-ZORRO#5739, close NG-ZORRO#5736, close NG-ZORRO#5519, close NG-ZORRO#5446, close NG-ZORRO#5152, close NG-ZORRO#4694, close NG-ZORRO#4472, close NG-ZORRO#3832, close NG-ZORRO#2785, close NG-ZORRO#2744
close NG-ZORRO#5976, close NG-ZORRO#5809, close NG-ZORRO#5739, close NG-ZORRO#5736, close NG-ZORRO#5519, close NG-ZORRO#5446, close NG-ZORRO#5152, close NG-ZORRO#4694, close NG-ZORRO#4472, close NG-ZORRO#3832, close NG-ZORRO#2785, close NG-ZORRO#2744
close NG-ZORRO#5976, close NG-ZORRO#5809, close NG-ZORRO#5739, close NG-ZORRO#5736, close NG-ZORRO#5519, close NG-ZORRO#5446, close NG-ZORRO#5152, close NG-ZORRO#4694, close NG-ZORRO#4472, close NG-ZORRO#3832, close NG-ZORRO#2785, close NG-ZORRO#2744
close NG-ZORRO#5976, close NG-ZORRO#5809, close NG-ZORRO#5739, close NG-ZORRO#5736, close NG-ZORRO#5519, close NG-ZORRO#5446, close NG-ZORRO#5152, close NG-ZORRO#4694, close NG-ZORRO#4472, close NG-ZORRO#3832, close NG-ZORRO#2785, close NG-ZORRO#2744
Reproduction link
https://stackblitz.com/edit/angular-q7lmud?file=src/app/app.component.ts
Steps to reproduce
我设置了一个定时器,5s后更新nzData值,树形结构收缩,没有展开
What is expected?
希望一直是展开状态
What is actually happening?
现在是收缩了
The text was updated successfully, but these errors were encountered: