From: | Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com> |
---|---|
To: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | [pgAdmin4][Patch]: RM1938 - Backgrid sorting not working for Integer/Number types |
Date: | 2017-01-06 08:50:17 |
Message-ID: | CAM5-9D9GdhuaxHKk__a+QgNStjE=EKV=jZZKK2cyMJX=ZB6SaQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi,
As the type of data we get from server side is of string type, due to which
the sorting for Integer/Number type columns is not working.
To fix this issue, we are using BigNumber JS library.
We are overriding Backgrid's sort and make_comparator method in
backgrid.pgadmin.js.
When sorting is performed based on column we identify the column
type(integer/number) and then convert its value into BigInteger and the
sorts data.
This patch is dependent on patch sent for "Adding support for BigNumber JS
library".
Also, thanks to Murtuza for help.
Please find attached patch and review.
Thanks,
Surinder Kumar
Attachment | Content-Type | Size |
---|---|---|
RM1938.patch | application/octet-stream | 6.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Khushboo Vashi | 2017-01-06 10:55:20 | [pgAdmin4][Patch]: RM 1730 - Role membership control display needs improvement |
Previous Message | Surinder Kumar | 2017-01-06 08:49:44 | [pgAdmin4][Patch]: Add support for BigNumber JS library |