Skip to content

Commit

Permalink
Fixed double rowEdit Trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
olifolkerd committed Jan 12, 2016
1 parent 2e8062b commit cbafe92
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tabulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ _cellDataChange: function(cell, value){

//update row data
var rowData = row.data("data");
var hasChanged = rowData[cell.data("field")] != value;
rowData[cell.data("field")] = value;
row.data("data", rowData);

Expand All @@ -351,9 +352,11 @@ _cellDataChange: function(cell, value){
cell.html(self._formatCell(cell.data("formatter"), value, rowData, cell, row, cell.data("formatterParams")))
.css({"padding":"4px"});

if(hasChanged){
//triger event
self.options.rowEdit(rowData.id, rowData, row);
}

//triger event
self.options.rowEdit(rowData.id, rowData, row);

self._styleRows();

Expand Down

0 comments on commit cbafe92

Please sign in to comment.