You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I create an OnDemandGrid with no items in the store that has a noDataMessage provided and add a new item and then update that item, the grid throws an error and the grid display is empty.
This doesn't seem to happen if the grid was created with an item in it and it also does not happen if no noDataMessage was provided.
If you apply the following changes to test/editor.html and click create grid you can see the error I am talking about.
diff --git a/test/editor.html b/test/editor.html
index 07e3a6c..edd0075 100644
--- a/test/editor.html
+++ b/test/editor.html
@@ -229,11 +229,7 @@
store,
i;
- for (i = 0; i < 200; i++){
- data.push(lang.mixin(options.generate(i), { id: i }));
- }
-
- store = new TestStore({ data: data });
+ store = Observable(new TestStore({ data: data }));
if(async){
store = new DeferredWrapper(store, 100);
}
@@ -260,11 +256,18 @@
if(!grid){
grid = new CustomGrid({
store: store,
+ noDataMessage: "No Data Message",
columns: {
"editor": editor(lang.mixin({}, options.column, columnArgs))
},
farOffRemoval: async ? 400 : Infinity
}, "grid");
+
+ setTimeout(function() {
+ var item = {id:0, editor:"Initial Value"};
+ store.add(item);
+ store.put(item);
+ });
}else{
// instead of destroying/recreating, just reset store + columns
grid.set("store", null);
The text was updated successfully, but these errors were encountered:
Thanks for the report. I can also reproduce this easily in test/OnDemand.html by clicking Set empty store under the first grid, then entering grid.put({ id: 1, col1: "foo" }); twice in the console.
This is a regression as of 0.3.9, so I'm taking an initial look at it today.
If I create an OnDemandGrid with no items in the store that has a noDataMessage provided and add a new item and then update that item, the grid throws an error and the grid display is empty.
This doesn't seem to happen if the grid was created with an item in it and it also does not happen if no noDataMessage was provided.
If you apply the following changes to test/editor.html and click create grid you can see the error I am talking about.
The text was updated successfully, but these errors were encountered: