1) Newly added server/server group is not visible in the tree unless pgAdmin is refreshed. Fixes #6839

2) Internal server error displayed if disconnect the server. Fixes #6852
This commit is contained in:
Khushboo Vashi
2021-10-03 12:12:02 +05:30
committed by Akshay Joshi
parent aaa8ab3856
commit 44e1a405f0
6 changed files with 13 additions and 13 deletions

View File

@@ -140,12 +140,12 @@ export class Tree {
await this.tree.toggleDirectory(item);
}
async select(item) {
await this.tree.setActiveFile(item);
async select(item, ensureVisible=false) {
await this.tree.setActiveFile(item, ensureVisible);
}
async selectNode(item) {
this.tree.setActiveFile(item);
async selectNode(item, ensureVisible=false) {
this.tree.setActiveFile(item, ensureVisible);
}
async unload(item) {
@@ -194,7 +194,7 @@ export class Tree {
wasLoad(item) {
if (item && item.type === FileType.Directory) {
return item.isExpanded;
return item.isExpanded && item.children != null && item.children.length > 0;
}
return true;
}
@@ -270,7 +270,7 @@ export class Tree {
}
itemData(item) {
return (item !== undefined && item.getMetadata('data') !== undefined) ? item._metadata.data : [];
return (item !== undefined && item !== null && item.getMetadata('data') !== undefined) ? item._metadata.data : [];
}
getData(item) {

View File

@@ -76,7 +76,7 @@ var initBrowserTree = async (pgBrowser) => {
// Render Browser Tree
await render(
<div>
<FileTreeX height={999} width={'100%'} model={treeModelX}
<FileTreeX height={950} width={'100%'} model={treeModelX}
onReady={itemHandle} create={create} remove={remove} update={update}/>
</div>, document.getElementById('tree'));
}

View File

@@ -54,7 +54,7 @@
font-size: 18px;
text-align: center;
height: 21px !important;
width: 20px;
width: 20px !important;
&:before {
height: inherit;
width: inherit;