angular2gridster icon indicating copy to clipboard operation
angular2gridster copied to clipboard

Gridster with async items (ngrx)

Open gentle9 opened this issue 5 years ago • 0 comments

I have a problem with using the gridster and storing the items in a ngrx store. I am saving the items on the itemChanged event. But the problem is that the content of the items and the items itselfs regenerates the complete content. So every time I change the size or position of the item the item is regenerated. If I don´t use the store the items will not be regenerated.

Here is a example (without the complete css). https://stackblitz.com/edit/ngrx-todos-bvxjrh

In console output you will see that the ngOnInit from grid-item.component.ts is called on every position and size changes. If I remove the line where it stores the items on the ngrx store the ngOnInit is only called once on the grid init but not on every change. (line: 389 in app.component.ts)

I am not sure if everything is correct but shouldnt the grid recognize the changes without creating the whole item on every change?

gentle9 avatar Jun 28 '19 17:06 gentle9