diff --git a/_StoreMixin.js b/_StoreMixin.js index b217a6440..6df96803c 100644 --- a/_StoreMixin.js +++ b/_StoreMixin.js @@ -193,11 +193,16 @@ function(kernel, declare, lang, Deferred, listen, aspect, put){ var colsWithSet = self._columnsWithSet, updating = self._updating, key, data; - // Copy dirty props to the original, applying setters if applicable - for(key in dirtyObj){ - object[key] = dirtyObj[key]; + + if (object.set && typeof object.set === "function") { + object.set(dirtyObj); + } else { + // Copy dirty props to the original, applying setters if applicable + for(key in dirtyObj){ + object[key] = dirtyObj[key]; + } } - + // Apply any set methods in column definitions. // Note that while in the most common cases column.set is intended // to return transformed data for the key in question, it is also diff --git a/test/editor_stateful.html b/test/editor_stateful.html new file mode 100644 index 000000000..b242d2110 --- /dev/null +++ b/test/editor_stateful.html @@ -0,0 +1,84 @@ + + + + + Test Stateful Editing + + + + + + +

Editor with Stateful objects

+ (This test requires dojo and dijit to be installed) +
+ + + \ No newline at end of file