Posts

Showing posts with the label ngx-bootstrap

Is there a way to delay the ngx-bootstrap accordion opening?

Is there a way to delay the ngx-bootstrap accordion opening? <accordion [closeOthers]=true> <accordion-group *ngFor="let activity of activities" [heading]="activity.Name" (click)="openPanel(activity)" (isOpenChange)="openStatusChange($event)"> <ul *ngFor="let chemical of chemicals"> <li>{{chemical.BrandName}}</li> </ul> 0">No chemicals associated with this activity type. </accordion-group> </accordion> When the accordian header is clicked, it opens and runs and fires 'openPanel()' which is an http.get, which then populates the panel. If the array returns empty, the *ngIf will display the "no associated stuff" message. The problem is there is a very slight lag between the time the accordion opens and the array is filled, so the chemicals array is always empty when the accordion opens. This makes it so the "no associated stuff" mes...