Fixed an issue where the F2 Function key removes browser panel contents. Fixes #7126

This commit is contained in:
Nikhil Mohite 2022-01-28 10:55:23 +05:30 committed by Akshay Joshi
parent 8f7b30075e
commit 37d82d457c
3 changed files with 14 additions and 8 deletions

View File

@ -26,5 +26,6 @@ Bug fixes
| `Issue #7109 <https://redmine.postgresql.org/issues/7109>`_ - Make the size blank for all the directories in the file select dialog.
| `Issue #7118 <https://redmine.postgresql.org/issues/7118>`_ - Ensure that JSON files should be downloaded properly from the storage manager.
| `Issue #7123 <https://redmine.postgresql.org/issues/7123>`_ - Fixed an issue where restore generates incorrect options for the schema.
| `Issue #7126 <https://redmine.postgresql.org/issues/7126>`_ - Fixed an issue where the F2 Function key removes browser panel contents.
| `Issue #7127 <https://redmine.postgresql.org/issues/7127>`_ - Added validation for Hostname in the server dialog.
| `Issue #7135 <https://redmine.postgresql.org/issues/7135>`_ - Enforce the minimum Windows version that the installer will run on.

View File

@ -138,7 +138,7 @@
"path-fx": "^2.0.0",
"pathfinding": "^0.4.18",
"paths-js": "^0.4.9",
"pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#90e62d4371d3d25a957b3ffc7c6cb81a928da06f",
"pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#bf7ac7be65898883e3e05c9733426152a1da6422",
"postcss": "^8.2.15",
"raf": "^3.4.1",
"react": "^17.0.1",

View File

@ -1269,14 +1269,19 @@ define('pgadmin.browser', [
// If there is no parent then just update the node
if(this.t.isRootNode(_parent) ||
(_parent && _parent.length == 0 && ctx.op == 'UPDATE')) {
var that = this;
this.t.remove(this.i).then(() => {
that.t.before(that.i, that.new).then((new_item) => {
that.t.select(new_item);
}, () => {
console.warn('Failed to add before..', arguments);
//Update node if browser has single child node.
if(this.t.children().length === 1) {
updateNode();
} else {
var that = this;
this.t.remove(this.i).then(() => {
that.t.before(that.i, that.new).then((new_item) => {
that.t.select(new_item);
}, () => {
console.warn('Failed to add before..', arguments);
});
});
});
}
} else {
var postRemove = function() {
// If item has parent but no grand parent