SitePen / dgrid

A lightweight, mobile-ready, data-driven, modular grid widget designed for use with dstore
http://dgrid.io/
Other
628 stars 295 forks source link

OnDemandList does not refresh on store.setData #1448

Open msssk opened 4 years ago

msssk commented 4 years ago

This issue is from SitePen/dstore#201.

A declare([ Memory, Trackable]) object does not automatically update the grid.

When dstore/Memory#setData is called on a declare([ Memory, Trackable]) object, the grid is not updated. In order to update the grid a reference to the grid must be available (grid#refresh()) or the dojo/store/Memory#putSync method must be used.

In comparison, dojo/store/Memory#setData does update the associated dijit/form/Select object.

Should dstore/Memory#setData be made to update its associated grids?

msssk commented 4 years ago

This certainly seems to make sense on the surface. However, dgrid has always behaved this way, even the 0.3 releases that used Dojo object stores, so changing behavior at this point would be a breaking change. There may be other considerations as well.

fkranenburg commented 4 years ago

I had the same problem and solution, maybe add extra flag property to auto update grid when data is changed so it won't be a breaking change.