|
|
@ -1343,7 +1343,7 @@ ItemSet.prototype._onAddItem = function (event) { |
|
|
|
var itemData = me.itemsData.get(item.id); // get a clone of the data from the dataset
|
|
|
|
this.options.onUpdate(itemData, function (itemData) { |
|
|
|
if (itemData) { |
|
|
|
me.itemsData.update(itemData); |
|
|
|
me.itemsData.getDataSet().update(itemData); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
@ -1373,7 +1373,7 @@ ItemSet.prototype._onAddItem = function (event) { |
|
|
|
// execute async handler to customize (or cancel) adding an item
|
|
|
|
this.options.onAdd(newItem, function (item) { |
|
|
|
if (item) { |
|
|
|
me.itemsData.add(item); |
|
|
|
me.itemsData.getDataSet().add(item); |
|
|
|
// TODO: need to trigger a redraw?
|
|
|
|
} |
|
|
|
}); |
|
|
|