public inbox for [email protected]  
help / color / mirror / Atom feed
From: Khushboo Vashi <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][Patch] - RM #7026 - Browser panel is not completely viewable
Date: Wed, 13 Apr 2022 15:26:12 +0530
Message-ID: <CAFOhELdb=9Zb_XMn6tcMWLjsuu79ffrKxAabnSOwwp_jWt6hDw@mail.gmail.com> (raw)

Hi,

Please find the attached patch to fix the rm #7026 - Browser panel is not
completely viewable.

Thanks,
Khushboo


Attachments:

  [application/octet-stream] RM_7026.patch (936B, 3-RM_7026.patch)
  download | inline diff:
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(
       <FileTreeX model={treeModelX}
-        onReady={itemHandle} create={create} remove={remove} update={update}/>
+        onReady={itemHandle} create={create} remove={remove} update={update}
+        height={_height} />
      , document.getElementById('tree'));
 }
 


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin4][Patch] - RM #7026 - Browser panel is not completely viewable
  In-Reply-To: <CAFOhELdb=9Zb_XMn6tcMWLjsuu79ffrKxAabnSOwwp_jWt6hDw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox