public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin][patch] Column sizing for no rows table
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin][patch] Column sizing for no rows table
@ 2021-05-17 12:07 Aditya Toshniwal <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Aditya Toshniwal @ 2021-05-17 12:07 UTC (permalink / raw)
To: pgadmin-hackers
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) {
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin][patch] Column sizing for no rows table
@ 2021-05-17 12:26 Akshay Joshi <[email protected]>
parent: Aditya Toshniwal <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2021-05-17 12:26 UTC (permalink / raw)
To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers
Thanks, patch applied.
On Mon, May 17, 2021 at 5:38 PM Aditya Toshniwal <
[email protected]> wrote:
> 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"
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-05-17 12:26 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 12:07 [pgAdmin][patch] Column sizing for no rows table Aditya Toshniwal <[email protected]>
2021-05-17 12:26 ` Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox