I am using mat-tab to display diagrams.
Each diagram is created with a query selector :
buildDiagram (stepName : string){
let modeler = new Editor.default({
container : document.querySelector('#diagram-'+stepName)
});
In my component, I have a tab list :
steps = [
{name: 'step1'},
{name: 'step3'},
{name: 'step2'}
];
For each tab, I create a diagram :
ngAfterViewInit():void {
for (let step of this.steps){
this.flowsheetEditorService.buildDiagram(step.name)
}
In my html, I'm trying to display the diagram of each tab like this :
<mat-tab-group 'class="diagramTabsContainer">
<mat-tab *ngFor="let step of steps" [label] = "step.name">
<div [id]="'diagram-'+step.name" style='height: 74vh;'></div>
</mat-tab>
</mat-tab-group>
The problem is that only the diagram of the initial selected tab is displayed.
Can you help? Thank you.