From bb78d91d1bfde035fe53613c1f6890d7e467a669 Mon Sep 17 00:00:00 2001 From: Nikhil Mohite Date: Thu, 6 Oct 2022 15:58:05 +0530 Subject: [PATCH] Ensure that scroll bar on browser tree should be visible on windows resize #5402 --- docs/en_US/release_notes_6_15.rst | 1 + web/pgadmin/browser/static/js/browser.js | 2 +- web/pgadmin/static/js/tree/tree_init.tsx | 11 +---------- web/pgadmin/static/scss/_pgadmin4-tree.overrides.scss | 4 ++++ 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/en_US/release_notes_6_15.rst b/docs/en_US/release_notes_6_15.rst index 0aa571e18..46f3fd0a5 100644 --- a/docs/en_US/release_notes_6_15.rst +++ b/docs/en_US/release_notes_6_15.rst @@ -45,3 +45,4 @@ Bug fixes | `Issue #5352 `_ - Fixed error occurring while LDAP authentication for a user with multiple email attributes. | `Issue #5367 `_ - Ensure that the correct value should be returned if an exception occurs while decoding the password. | `Issue #5368 `_ - Fixed the issue while downloading the file from the file manager. + | `Issue #5402 `_ - Ensure that scroll bar on browser tree should be visible on windows resize. diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js index 04f5ad59e..bf6c1f400 100644 --- a/web/pgadmin/browser/static/js/browser.js +++ b/web/pgadmin/browser/static/js/browser.js @@ -196,7 +196,7 @@ define('pgadmin.browser', [ isPrivate: true, icon: '', limit: 1, - content: '
', + content: '
', onCreate: function(panel, $container) { toolBar.initializeToolbar(panel, wcDocker); $container.addClass('pg-no-overflow'); diff --git a/web/pgadmin/static/js/tree/tree_init.tsx b/web/pgadmin/static/js/tree/tree_init.tsx index 7a71be2be..2716e17a8 100644 --- a/web/pgadmin/static/js/tree/tree_init.tsx +++ b/web/pgadmin/static/js/tree/tree_init.tsx @@ -87,20 +87,11 @@ var initBrowserTree = async (pgBrowser) => { } await treeModelX.root.ensureLoaded(); - var _height = undefined; - - [...document.getElementsByClassName('wcLayoutPane')].forEach((item, index) => { - if ($(item).find('#tree').length == 1) { - _height = item.clientHeight - 30; - } - }); - // Render Browser Tree await render( + onReady={itemHandle} create={create} remove={remove} update={update} height={'100%'} disableCache={true} /> , document.getElementById('tree')); } diff --git a/web/pgadmin/static/scss/_pgadmin4-tree.overrides.scss b/web/pgadmin/static/scss/_pgadmin4-tree.overrides.scss index 1e9ba3ddd..7f43f1e3f 100644 --- a/web/pgadmin/static/scss/_pgadmin4-tree.overrides.scss +++ b/web/pgadmin/static/scss/_pgadmin4-tree.overrides.scss @@ -10,6 +10,10 @@ width: 100%; } +.browser-tree { + height: 100%; +} + .file-tree > { div { position: absolute !important;