Fix issue where Deleting N number of rows makes first N number of rows disable. Fixes #3605

This commit is contained in:
Murtuza Zabuawala 2019-08-19 12:12:28 +05:30 committed by Akshay Joshi
parent 663e8382f3
commit 3155380621
2 changed files with 5 additions and 6 deletions

View File

@ -30,6 +30,7 @@ Housekeeping
Bug fixes
*********
| `Issue #3605 <https://redmine.postgresql.org/issues/3605>`_ - Fix issue where Deleting N number of rows makes first N number of rows disable.
| `Issue #4179 <https://redmine.postgresql.org/issues/4179>`_ - Fix generation of reverse engineered SQL for tables with Greenplum 5.x.
| `Issue #4229 <https://redmine.postgresql.org/issues/4229>`_ - Update wcDocker to allow the browser's context menu to be used except in tab strips and panel headers.
| `Issue #4401 <https://redmine.postgresql.org/issues/4401>`_ - Ensure type names are properly encoded in the results grid.

View File

@ -2776,15 +2776,14 @@ define('tools.querytool', [
},
rows_to_delete: function(data) {
var self = this,
tmp_keys = self.primary_keys;
let self = this;
let tmp_keys = self.primary_keys;
// re-calculate rows with no primary keys
self.temp_new_rows = [];
data.forEach(function(d, idx) {
var p_keys_list = _.pick(d, tmp_keys),
is_primary_key = Object.keys(p_keys_list).length ?
p_keys_list[0] : undefined;
let p_keys_list = _.pick(d, _.keys(tmp_keys));
let is_primary_key = Object.keys(p_keys_list).length > 0;
if (!is_primary_key) {
self.temp_new_rows.push(idx);
@ -3017,7 +3016,6 @@ define('tools.querytool', [
dataView.endUpdate();
}
self.rows_to_delete.apply(self, [data]);
grid.setSelectedRows([]);
}
grid.setSelectedRows([]);