Skip to content

Commit 82cd7a2

Browse files
committed
- Rolled back the bad changeset ("updateRowCount() no longer removes an extra row").
- FIXED: Issue 50 - Two bugs: Filtering bug and Add Row bug when filtered.
1 parent 64b2fc0 commit 82cd7a2

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

examples/example4-model.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ <h2>Demonstrates:</h2>
264264
// wire up model events to drive the grid
265265
dataView.onRowCountChanged.subscribe(function(args) {
266266
grid.updateRowCount();
267+
grid.render();
267268
});
268269

269270
dataView.onRowsChanged.subscribe(function(rows) {

examples/example5-collapsing.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ <h2>Demonstrates:</h2>
227227
// wire up model events to drive the grid
228228
dataView.onRowCountChanged.subscribe(function(args) {
229229
grid.updateRowCount();
230+
grid.render();
230231
});
231232

232233
dataView.onRowsChanged.subscribe(function(rows) {

slick.grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ if (!jQuery.fn.drag) {
12131213
// this helps avoid redundant calls to .removeRow() when the size of the data decreased by thousands of rows
12141214
var l = options.enableAddRow ? gridDataGetLength() : gridDataGetLength() - 1;
12151215
for (var i in rowsCache) {
1216-
if (i > l) {
1216+
if (i >= l) {
12171217
removeRowFromCache(i);
12181218
}
12191219
}

0 commit comments

Comments
 (0)