[pgadmin-hackers] [pgAdmin4][Patch]: RM1938 - Backgrid sorting not working forInteger/Number types - Mailing list pgadmin-hackers

From Surinder Kumar
Subject [pgadmin-hackers] [pgAdmin4][Patch]: RM1938 - Backgrid sorting not working forInteger/Number types
Date
Msg-id CAM5-9D9GdhuaxHKk__a+QgNStjE=EKV=jZZKK2cyMJX=ZB6SaQ@mail.gmail.com
Whole thread Raw
List 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

pgadmin-hackers by date:

Previous
From: Surinder Kumar
Date:
Subject: [pgadmin-hackers] [pgAdmin4][Patch]: Add support for BigNumber JS library
Next
From: Khushboo Vashi
Date:
Subject: [pgadmin-hackers] [pgAdmin4][Patch]: RM 1730 - Role membership control display needs improvement