[pgAdmin4][Patch]: RM #3029 Cannot sort columns when importing data - Mailing list pgadmin-hackers

From Akshay Joshi
Subject [pgAdmin4][Patch]: RM #3029 Cannot sort columns when importing data
Date
Msg-id CANxoLDcZ5dZW2HtsbWh8=bcCzsBz6wBEARPbp2uf9Lf4vzMDuQ@mail.gmail.com
Whole thread Raw
Responses Re: [pgAdmin4][Patch]: RM #3029 Cannot sort columns when importing data  (Dave Page <dpage@pgadmin.org>)
List pgadmin-hackers
Hi Hackers,

Attached is the patch to fix the RM #3029 Cannot sort columns when importing data.
Select2 orders the selections based on the order of the `<options>` behind the scenes. This means that the order will typically match the order of the options as they appear in the dropdown. For import/export it shows in the order of columns define in the table.

Solution: I have just reorders the options inside the select2 every time, an item is selected. I have made this change into the select2 control with new option "preserveSelectionOrder" by default it is false, so won't impact any other module. 

--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Attachment

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: [pgAdmin4][Patch]: RM #1513 - Unable to do max selection to drop tables/sequences/functions
Next
From: Aditya Toshniwal
Date:
Subject: Re: [pgAdmin4][Patch]: Fixed process watcher status message.