diff --git a/docs/en_US/release_notes_4_12.rst b/docs/en_US/release_notes_4_12.rst index e7a58abce..5e59eb452 100644 --- a/docs/en_US/release_notes_4_12.rst +++ b/docs/en_US/release_notes_4_12.rst @@ -30,6 +30,7 @@ Housekeeping Bug fixes ********* +| `Issue #3605 `_ - Fix issue where Deleting N number of rows makes first N number of rows disable. | `Issue #4179 `_ - Fix generation of reverse engineered SQL for tables with Greenplum 5.x. | `Issue #4229 `_ - Update wcDocker to allow the browser's context menu to be used except in tab strips and panel headers. | `Issue #4401 `_ - Ensure type names are properly encoded in the results grid. diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index 4f387a5ce..2a956a3d7 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -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([]);