public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dave Page <[email protected]>
To: Surinder Kumar <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin4][Patch]: RM1938 - Backgrid sorting not working for Integer/Number types
Date: Mon, 9 Jan 2017 15:58:07 +0530
Message-ID: <CA+OCxow8EnTJQhuuxMwEgvB_1fKeS=7tc2vCraMzG0C0HVb9Jg@mail.gmail.com> (raw)
In-Reply-To: <CAM5-9D-L8DRtOKHHFLB4J5MNspb+t4tfpz7rtmEXwrw4tCX6tA@mail.gmail.com>
References: <CAM5-9D9GdhuaxHKk__a+QgNStjE=EKV=jZZKK2cyMJX=ZB6SaQ@mail.gmail.com>
<CA+OCxoxDMo6H0CdDArEP6SKr7Y5rWuqxgPYc_vw3dNBBh7njvw@mail.gmail.com>
<CAM5-9D-L8DRtOKHHFLB4J5MNspb+t4tfpz7rtmEXwrw4tCX6tA@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Thanks - that works nicely, so patch applied.
On Mon, Jan 9, 2017 at 3:42 PM, Surinder Kumar
<[email protected]> wrote:
> Hi Dave,
>
> I just missed the code for swapping left and right values if order is
> descending. It's fixed.
> Please find attached patch and review.
>
> On Mon, Jan 9, 2017 at 9:05 AM, Dave Page <[email protected]> wrote:
>>
>> Hi
>>
>> On Friday, January 6, 2017, Surinder Kumar
>> <[email protected]> wrote:
>>>
>>> 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.
>>
>>
>> This works fine for ascending sorts, but if i click the row header a
>> second time for a descending sort, the order isn't reversed as expected.
>>
>> Thanks, Dave.
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
view thread (3+ messages)
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], [email protected]
Subject: Re: [pgAdmin4][Patch]: RM1938 - Backgrid sorting not working for Integer/Number types
In-Reply-To: <CA+OCxow8EnTJQhuuxMwEgvB_1fKeS=7tc2vCraMzG0C0HVb9Jg@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