Skip to content

Commit

Permalink
Merge pull request #28 from alangrafu/master
Browse files Browse the repository at this point in the history
Core: Provide previousItem argument to onItemUpdated callback
  • Loading branch information
tabalinas committed May 15, 2015
2 parents 9eefd0b + 8dc777f commit df962d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/jsgrid.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,8 @@
_updateRow: function($updatingRow, editedItem) {
var updatingItem = $updatingRow.data(JSGRID_ROW_DATA_KEY),
updatingItemIndex = this._itemIndex(updatingItem);

var previousItem = {};
$.extend(previousItem, updatingItem);
$.extend(updatingItem, editedItem);

this._callEventHandler(this.onItemUpdating, {
Expand All @@ -1069,7 +1070,8 @@
this._callEventHandler(this.onItemUpdated, {
row: $updatingRow,
item: updatedItem,
itemIndex: updatingItemIndex
itemIndex: updatingItemIndex,
previousItem: previousItem
});
});
},
Expand Down

0 comments on commit df962d0

Please sign in to comment.