Hi!
I encountered a problem updating my AccordionItems.
I created a template like this:
<ejs-accordion #accordion>
<e-accordionitems>
<e-accordionitem
*ngFor="let accordionItem of accordionItems"
expanded="true"
>
<ng-template #header>
<div>{{ accordionItem.titleVar }}</div>
</ng-template>
<ng-template #content>
<div>{{ accordionItem.contentVar }}</div>
</ng-template>
</e-accordionitem>
</e-accordionitems>
</ejs-accordion>
So, my accordion items should be dynamically created using ngFor and an accordionItems-variable containing title and content.
When I then try to update this accordionItems-variable, the accordion is not updated correctly.
Please refer to the following stackblitz sample: https://stackblitz.com/edit/ej2-accordion-syncfusion-angular-y3u1cg?file=app.component.ts
On the first button click, the three accordion items that are already on the screen are updated with the correct values, but the additional item is not added.
On the second button click, there are still three items, but also the first ones lose their correct data for display.
First, I thought that it is a change detection problem connected to ngFor, but obviously angular recognizes the change and does something. But its not the desired reaction.
Can you explain this weird behaviour?
Thanks in regard
Jonas!