Thread: [pgAdmin][RM5038] Select2 enhancement - Load items on demand (scroll)
Hi Hackers,
Attached is the patch to enhance select2 used in pgAdmin. The select2 dropdown will show only a few items when opened initially. On scrolling it will show others. Searching will work as before. This will reduce the number of DOM nodes on page.
Note that, individual controls can disable the behaviour if desired by passing onDemandLoad:false for select2 options. It is enabled by default.
Kindly review.
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
Attachment
Thanks, patch applied.
On Tue, Dec 24, 2019 at 1:01 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,Attached is the patch to enhance select2 used in pgAdmin. The select2 dropdown will show only a few items when opened initially. On scrolling it will show others. Searching will work as before. This will reduce the number of DOM nodes on page.Note that, individual controls can disable the behaviour if desired by passing onDemandLoad:false for select2 options. It is enabled by default.Kindly review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"
Thanks & Regards
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
Mobile: +91 976-788-8246
Re: [pgAdmin][RM5038] Select2 enhancement - Load items on demand (scroll)
From
Aditya Toshniwal
Date:
Hi Hackers,
The previous patch broke the tags and tokenizer options of select2. Turned out, with the change of data adapter we also need to configure adapters for tags, tokenizer and others.
Attached is the patch to set those to the default available in select2.
I've also renamed onDemandLoad to showOnScroll to avoid confusion as we are showing the already present data on scroll and not loading the data on demand from ajax.
Kindly review.
On Wed, Jan 1, 2020 at 11:25 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Thanks, patch applied.On Tue, Dec 24, 2019 at 1:01 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to enhance select2 used in pgAdmin. The select2 dropdown will show only a few items when opened initially. On scrolling it will show others. Searching will work as before. This will reduce the number of DOM nodes on page.Note that, individual controls can disable the behaviour if desired by passing onDemandLoad:false for select2 options. It is enabled by default.Kindly review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
Attachment
Hi Aditya

Got below error in while opening Language dialog. Please fix it.

On Fri, Jan 3, 2020 at 3:13 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,The previous patch broke the tags and tokenizer options of select2. Turned out, with the change of data adapter we also need to configure adapters for tags, tokenizer and others.Attached is the patch to set those to the default available in select2.I've also renamed onDemandLoad to showOnScroll to avoid confusion as we are showing the already present data on scroll and not loading the data on demand from ajax.Kindly review.On Wed, Jan 1, 2020 at 11:25 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Thanks, patch applied.On Tue, Dec 24, 2019 at 1:01 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to enhance select2 used in pgAdmin. The select2 dropdown will show only a few items when opened initially. On scrolling it will show others. Searching will work as before. This will reduce the number of DOM nodes on page.Note that, individual controls can disable the behaviour if desired by passing onDemandLoad:false for select2 options. It is enabled by default.Kindly review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"
Thanks & Regards
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
Mobile: +91 976-788-8246
Attachment
Re: [pgAdmin][RM5038] Select2 enhancement - Load items on demand (scroll)
From
Aditya Toshniwal
Date:
Hi Hackers,
Attached is the updated patch to fix error mentioned. Kindly review.
On Mon, Jan 6, 2020 at 11:40 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi AdityaGot below error in while opening Language dialog. Please fix it.On Fri, Jan 3, 2020 at 3:13 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,The previous patch broke the tags and tokenizer options of select2. Turned out, with the change of data adapter we also need to configure adapters for tags, tokenizer and others.Attached is the patch to set those to the default available in select2.I've also renamed onDemandLoad to showOnScroll to avoid confusion as we are showing the already present data on scroll and not loading the data on demand from ajax.Kindly review.On Wed, Jan 1, 2020 at 11:25 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Thanks, patch applied.On Tue, Dec 24, 2019 at 1:01 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to enhance select2 used in pgAdmin. The select2 dropdown will show only a few items when opened initially. On scrolling it will show others. Searching will work as before. This will reduce the number of DOM nodes on page.Note that, individual controls can disable the behaviour if desired by passing onDemandLoad:false for select2 options. It is enabled by default.Kindly review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
Attachment
Thanks, patch applied.
On Mon, Jan 6, 2020 at 12:36 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,Attached is the updated patch to fix error mentioned. Kindly review.On Mon, Jan 6, 2020 at 11:40 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi AdityaGot below error in while opening Language dialog. Please fix it.On Fri, Jan 3, 2020 at 3:13 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,The previous patch broke the tags and tokenizer options of select2. Turned out, with the change of data adapter we also need to configure adapters for tags, tokenizer and others.Attached is the patch to set those to the default available in select2.I've also renamed onDemandLoad to showOnScroll to avoid confusion as we are showing the already present data on scroll and not loading the data on demand from ajax.Kindly review.On Wed, Jan 1, 2020 at 11:25 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Thanks, patch applied.On Tue, Dec 24, 2019 at 1:01 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to enhance select2 used in pgAdmin. The select2 dropdown will show only a few items when opened initially. On scrolling it will show others. Searching will work as before. This will reduce the number of DOM nodes on page.Note that, individual controls can disable the behaviour if desired by passing onDemandLoad:false for select2 options. It is enabled by default.Kindly review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"
Thanks & Regards
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
Mobile: +91 976-788-8246