Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.

Commit 3b9f08c

Browse files
committed
Update dist
1 parent 8622527 commit 3b9f08c

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

lib/backgrid.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,6 +2318,7 @@ var Body = Backgrid.Body = Backbone.View.extend({
23182318
emptyText: this.emptyText,
23192319
columns: this.columns
23202320
}));
2321+
return true;
23212322
}
23222323
},
23232324

@@ -2405,7 +2406,9 @@ var Body = Backgrid.Body = Backbone.View.extend({
24052406
// removeRow() is called directly
24062407
if (!options) {
24072408
this.collection.remove(model, (options = collection));
2408-
this._unshiftEmptyRowMayBe();
2409+
if (this._unshiftEmptyRowMayBe()) {
2410+
this.render();
2411+
}
24092412
return;
24102413
}
24112414

@@ -2414,7 +2417,9 @@ var Body = Backgrid.Body = Backbone.View.extend({
24142417
}
24152418

24162419
this.rows.splice(options.index, 1);
2417-
this._unshiftEmptyRowMayBe();
2420+
if (this._unshiftEmptyRowMayBe()) {
2421+
this.render();
2422+
}
24182423

24192424
return this;
24202425
},
@@ -2587,7 +2592,10 @@ var Body = Backgrid.Body = Backbone.View.extend({
25872592
var i = this.collection.indexOf(model);
25882593
var j = this.columns.indexOf(column);
25892594
var cell, renderable, editable, m, n;
2590-
2595+
2596+
// return if model being edited in a different grid
2597+
if (j === -1) return this;
2598+
25912599
this.rows[i].cells[j].exitEditMode();
25922600

25932601
if (command.moveUp() || command.moveDown() || command.moveLeft() ||

0 commit comments

Comments
 (0)