Fixed an issue where select all checkbox only selects the first 50 tables. Fixes #4226

This commit is contained in:
Yogesh Mahajan authored and Akshay Joshi committed 2020-06-16 11:05:10 +05:30
1 parent 697f4aec95
commit 2ae5c0ec4f
2 files changed
+12

No files matched your search

@@ -312,6 +312,9 @@ define([
$('.pg-prop-content').on('scroll', that.__loadMoreRows.bind(that));
that.collection.reset(that.data.splice(0, 50));
// Listen to select all checkbox event
that.collection.on('backgrid:select-all', that.__loadAllRows.bind(that));
} else {
// Do not listen the scroll event
$('.pg-prop-content').off('scroll', that.__loadMoreRows);
@@ -436,6 +439,14 @@ define([
}
}
},
__loadAllRows: function(tmp, checked) {
if (this.data.length > 0) {
this.collection.add(this.data);
this.collection.each(function (model) {
model.trigger('backgrid:select', model, checked);
});
}
},
generate_url: function(item, type) {
/*
* Using list, and collection functions of a node to get the nodes