public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][patch] Column sizing for no rows table
Date: Mon, 17 May 2021 17:37:42 +0530
Message-ID: <CAM9w-_=QBbiP591aKpchUv06Drk=QOFv_oauwx5K0tvjTy7mbA@mail.gmail.com> (raw)
Hi Hackers,
Attached patch fixes a column sizing issue when there are no rows in a
table.
Please review.
--
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"
Attachments:
[application/octet-stream] colresize.emptyrow.patch (676B, 3-colresize.emptyrow.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index a25c00043..c10e6517a 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -1414,6 +1414,10 @@ define('tools.querytool', [
collection[i] = item;
}
dataView.setItems(collection, self.client_primary_key);
+ /* Resize the columns once if data empty */
+ if (collection.length === 0 && self.preferences.column_data_auto_resize) {
+ self.grid.resizeAllColumns && self.grid.resizeAllColumns();
+ }
},
fetch_next_all: function(cb) {
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: [pgAdmin][patch] Column sizing for no rows table
In-Reply-To: <CAM9w-_=QBbiP591aKpchUv06Drk=QOFv_oauwx5K0tvjTy7mbA@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