mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-25 22:20:05 -05:00
Fixed an issue where select all checkbox only selects the first 50 tables. Fixes #4226
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user