I have to fetch data over HTTP and load it into a cell. However, when my service finishes loading the data, data in cell is displayed only if I click/drag the cell, or click/drag/resize/delete any other cell.
Here is a demonstration on stackblitz (the cell which should display dynamically fetched data is yellow).
In the demo my service is injected in the constructor of app.component.ts, and data is stored in the variable users. Then, in the template, the content is shown only if users variable has some value i.e.
<div class="dynamic-users" *ngIf="users">
Dynamic users are: <span *ngFor="let user of users">{{user.name}} </span>
</div>
All relevant code is commented in app.component.ts and app.component.html. My question is, is this expected behavior of gridster, and/or should I "refresh" the grid somehow after loading data from an external API?
I have to fetch data over HTTP and load it into a cell. However, when my service finishes loading the data, data in cell is displayed only if I click/drag the cell, or click/drag/resize/delete any other cell.
Here is a demonstration on stackblitz (the cell which should display dynamically fetched data is yellow).
In the demo my service is injected in the constructor of
app.component.ts, and data is stored in the variableusers. Then, in the template, the content is shown only ifusersvariable has some value i.e.All relevant code is commented in
app.component.tsandapp.component.html. My question is, is this expected behavior of gridster, and/or should I "refresh" the grid somehow after loading data from an external API?