Skip to content

Data loaded with HTTP appears only after a click #269

Description

@petarnikolovski

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions