mz-collapsible-item bug
See original GitHub issueWhen looping through an array then modifying the array, doesn’t update the collection items.
Html:
<mz-card>
<mz-card-content>
<button mz-button (click)="changeValues();">Click me</button>
<button mz-button (click)="changeValues2();">Click me</button>
<button mz-button (click)="changeValues3();">Click me</button>
<button mz-button (click)="changeValues4();">Click me</button>
<mz-collapsible class="col s12" *ngIf="list.length > 0">
<mz-collapsible-item *ngFor="let item of list">
<mz-collapsible-item-header>
{{item}}
</mz-collapsible-item-header>
<mz-collapsible-item-body>
{{item}} body
</mz-collapsible-item-body>
</mz-collapsible-item>
</mz-collapsible>
</mz-card-content>
</mz-card>
TS:
list = ['Item1', 'Item2', 'Item3'];
constructor() {}
changeValues() {
this.list = ['Item5', 'Item6']; // Just adds the values to the collapsible doesn't set it.
}
changeValues2() {
this.list = ['Item7', 'Item8']; // Same as in changeValues()
}
changeValues3() {
this.list = []; // Removes everything from the collapsible
}
changeValues4() {
this.list = []; // Doesn't resets the collapsible items like in changeValues3()
this.list = ['New item', 'New item2']; // Just adds these two to the collapsible
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Collapsible sections: Linking to auto-expand a section and ...
As already discussed in some previous threads collapsible sections have a lowered functionality when being linked to; even though Section headers have.
Read more >collapsible fieldset not working [#2339867] | Drupal.org
Here is the bug: If I create collapsible fieldset using field_group, they will not work under a bootstrap theme.
Read more >Collapsible Sections on SharePoint Modern pages
1. Go to the site collection page where you want to create collapsible section. 2. Click on the edit option from the command...
Read more >Manual talk:Collapsible elements - MediaWiki
Click on a TOC item which lies within a currently hidden area, nothing will happenEdit. If a person clicks on a TOC item...
Read more >Bootstrap Collapse Is Not Animated The First Time And Has a ...
... however when the collapsible element is getting hidden there is no ... any links concerning bootstrap collapse bugs caused by heights.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks you for reporting this bug. We will look to fix it in upcoming release.
@caom92 this is a nice workaround actually. I ended up ditching using this collapsible, I was having a big impact in the perfomance to render them over and over again, so I created my own and was incredible easy tbh.