From 0b7bde2775a46ebbd180e131e5aa0838e49c95b1 Mon Sep 17 00:00:00 2001 From: Khushboo Vashi Date: Wed, 13 Apr 2022 17:37:34 +0530 Subject: [PATCH] Fixed an issue where the Browser panel is not completely viewable. Fixes #7026 --- docs/en_US/release_notes_6_9.rst | 1 + web/pgadmin/static/js/tree/tree_init.tsx | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_6_9.rst b/docs/en_US/release_notes_6_9.rst index 341de55d3..26f108bda 100644 --- a/docs/en_US/release_notes_6_9.rst +++ b/docs/en_US/release_notes_6_9.rst @@ -25,6 +25,7 @@ Bug fixes | `Issue #6725 `_ - Fixed an issue where the Query tool opens on minimum size if the user opens multiple query tool Window quickly. | `Issue #6958 `_ - Only set permissions on the storage directory upon creation. + | `Issue #7026 `_ - Fixed an issue where the Browser panel is not completely viewable. | `Issue #7168 `_ - Improvement to the Geometry Viewer popup to change the size of the result tables when column names are quite long. | `Issue #7187 `_ - Fixed an issue where the downloaded ERD diagram was 0 bytes. | `Issue #7188 `_ - Fixed an issue where the connection bar is not visible. diff --git a/web/pgadmin/static/js/tree/tree_init.tsx b/web/pgadmin/static/js/tree/tree_init.tsx index 168708bc4..3d4379fa6 100644 --- a/web/pgadmin/static/js/tree/tree_init.tsx +++ b/web/pgadmin/static/js/tree/tree_init.tsx @@ -86,12 +86,21 @@ var initBrowserTree = async (pgBrowser) => { return true; } - await treeModelX.root.ensureLoaded() + await treeModelX.root.ensureLoaded(); + var _height = undefined; + + document.getElementsByClassName('wcLayoutPane').forEach((item, index) => { + if (index > 0 && $(item).find('#tree').length == 1) { + _height = item.clientHeight - 30; + } + }); + // Render Browser Tree await render( + onReady={itemHandle} create={create} remove={remove} update={update} + height={_height} /> , document.getElementById('tree')); }