Support » Plugin: Smart Grid-Layout Design for Contact Form 7 » Select2 is slow on opening with large data set

  • Resolved 78mails

    (@78mails)


    Hello, Venet! Thank you super cool plugin! It’s going to be perfect very soon.

    I have a large data set of categories that I want to show with Select2, but it’s to slow on opening dropdown.

    Please help! Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    I have a large data set of categories that I want to show with Select2, but it’s to slow on opening dropdown.

    how large is your list?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    If you have a very large lists, you will need to customise your select2 field to load the data using an ajax request. To do this you will need to destroy the initial select2 object once the form is loaded and recreate it using the ajax data source as detailed in the link above.

    The form emits a js event 'cf7SmartGridReady' once the form is ready. It also fires 'sgSelect2' events for each select2 field creation, so you could use either to fire your custom js script.

    Thread Starter 78mails

    (@78mails)

    Hello! Please, look what I found Select2 performance for large set of items.

    working example with 20000 items here: http://embed.plnkr.co/db8SXs/preview

    I think it would be awesome to add this to your plugin.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I think it would be awesome to add this to your plugin.

    as I explained in my previous post, all this can be achieved by yourself using a custom js file. The plugin was designed to ensure users can customise to their need.

    Adding this functionality to the plugin is possible but the number of users actually needing it is very limited. So unless a project funds me to do it I will not be adding it…unless you want to fund it, in which case you can reach out to me on vrata at syllogic dot in

    Plugin Author Aurovrata Venet

    (@aurovrata)

    @78mails I will add this as a potential milestone in the development cycle for future preformance improvements (v5 of the nect major release).

    did you notice that in the solutions to the stackOverflow link you provided above, there is a response from a user that suggest how to improve serach performance with the minimumInputLenght parameter

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Select2 is slow on opening with large data set’ is closed to new replies.