Skip to content

Commit

Permalink
Fix add/remove row indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Feb 20, 2016
1 parent af183fd commit c97cb96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qgrid/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def add_row(self, value=None):
double_precision=precision)
msg = json.loads(row_data)
msg[self._index_name] = str(last.name)
msg['id'] = str(last.name)
msg['slick_grid_id'] = str(last.name)
msg['type'] = 'add_row'
self._dirty = True
self.send(msg)
Expand Down
2 changes: 1 addition & 1 deletion qgrid/qgridjs/qgrid.widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ define([path + "widgets/js/widget", path + "widgets/js/manager"], function(widge
return;
}
var data = sgrid.getData().getItem(cell.row);
grid.data_view.deleteItem(data.id);
grid.data_view.deleteItem(data.slick_grid_id);
msg = {'type': 'remove_row', 'row': cell.row, 'id': data.id};
this.updateSize();
this.send(msg);
Expand Down

0 comments on commit c97cb96

Please sign in to comment.