Open ubhutani opened 7 years ago
I also get the same error if I change example4 - http://mleibman.github.io/SlickGrid/examples/example4-model.html
Replace this code -
for (var i = 0; i < 50000; i++) { var d = (data[i] = {}); d["id"] = "id_" + i; d["num"] = i; d["title"] = "Task " + i; d["duration"] = "5 days"; d["percentComplete"] = Math.round(Math.random() * 100); d["start"] = "01/01/2009"; d["finish"] = "01/05/2009"; d["effortDriven"] = (i % 5 == 0); } with this -
var x; for (var i = 0; i < 5; i++) { var d = (data[i] = {}); if (i == 0) x = "1"; if (i == 1) x = "11"; if (i == 2) x = "111"; if (i == 3) x = "1111"; if (i == 4) x = "2";
d["id"] = "id_" + i; d["num"] = i; d["title"] = "Task " + x; d["duration"] = "5 days"; d["percentComplete"] = Math.round(Math.random() * 100); d["start"] = "01/01/2009"; d["finish"] = "01/05/2009"; d["effortDriven"] = (i % 5 == 0); }
Add this line - dataView.setPagingOptions({pageSize: 4});
Go to page 2 and search for Task 1. It should say Showing Page 2 of 1.
If I do a search on the 2nd page and if the number of items returned equal the page size then the page does not flip back to the first page. Instead it says Page 2 of 1. The page back arrow does allow me to go back and then it says Page 1 of 1 correctly.