[pgadmin-hackers] pgAdmin 4 commit: Use more sensible column sizes for the data outputin - Mailing list pgadmin-hackers

From Dave Page
Subject [pgadmin-hackers] pgAdmin 4 commit: Use more sensible column sizes for the data outputin
Date
Msg-id E1cGNcE-00049X-Ob@gothos.postgresql.org
Whole thread Raw
List pgadmin-hackers
Use more sensible column sizes for the data output in the query tool. Fixes #1789

Per Akshay:

I have tried to get the width of the content but we are sending complete data as collection to the SlickGrid. We will
haveto fetch the content of each column and figure out the maximum length for that column by iterating all the rows is
tooexpensive. Apart from that to set the width in 'ch' we will have to do it using css. With current implementation we
aresetting the column option of the SlickGrid from javascript code. 

I have fixed this issue by setting the width of the columns based on data type. I have set the width of boolean column
to60, all the numeric/integer columns to 80 and for all other data types it is 20% of the container width as 33% is too
wide.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=686237413cc64ee93bdf5844036150beb0fbe43d
Author: Akshay Joshi <akshay.joshi@enterprisedb.com>

Modified Files
--------------
.../sqleditor/templates/sqleditor/js/sqleditor.js  | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)


pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM 2007: View Last 100 rowsnot working with Pgadmin4
Next
From: Dave Page
Date:
Subject: Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM 1789 Column width of dataoutput panel should fit to data (as pgAdmin III)