Choices-js/Choices

Option to *not* fill the underlying select

Opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
Since v11, the underlying select element is filled with the options, even if the options are programmed.
While this is not a problem with few options, it can be a huge load on the html page with many elements. Multiply this with a few controls and the page starts to crawl (I have a page with 11 choices and a lot of options that loaded instantly in v10 and now takes 45s to load).

Minimal example using v10
minimal example using v11

Describe the solution you'd like
I'd like to have an option to revert to the previous behavior, i.e. not to put the options in the select element.

There is also a bug, where the underlying select is not cleaned up, when you execute following code twice.
This just adds the items as option tags.

choices.setChoices(options, "value", "label", true);
choices.setChoices(options, "value", "label", true);

underlying select is not cleaned up too with clearChoices
choices.clearChoices();

Its working in version 11.0.1