mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where the F2 Function key removes browser panel contents. Fixes #7126
This commit is contained in:
committed by
Akshay Joshi
parent
8f7b30075e
commit
37d82d457c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user