0

I am trying to implement a dashboard where the user can add / remove and reorder widgets.

Loading the persisted state should not be a problem since I can create something like this:

<kendo-tilelayout-item *ngFor="let widget of widgets"
                   [title]="widget.title"
                   [col]="widget.col"
                   [order]="widget.order">...</kendo-tilelayout-item>

But how can I persist the state of the tilelayout to my models?

I tried with the reorder event but there I haven't got any information to identify my widget models.

public onReorder(e: TileLayoutReorderEvent): void {
   // Find the model to persist changes
}
Hans Dabi
  • 159
  • 13
  • couldn't you sort in the `ngFor` directive like [this](https://stackoverflow.com/a/56126232/4056146)? you will need to give every widget a unique ID – xinthose Dec 14 '21 at 03:54
  • Unfortunately that does not solve my issue but I think I found a workaround, setting a Html id for the tilelayout-items which matches the id of the widget. With that information I can reproduce which widget was moved – Hans Dabi Dec 15 '21 at 09:01

0 Answers0