After keeping my PR for option adding (#166) up to date for over 2 years I got a suggestion from @mculp: koenpunt/chosen#38.
And by extracting more code into separate methods extending Chosen should become a breeze.
extracted single_set_nosearch into separate function for better exten…
you should extract it in the Prototype version too, to stay consistent
You're right! Would've come to that when testing extending the prototype version. For now will mark this WIP
Expose Chosen constructor as $.fn.chosen.Constructor for easier exten…
Use Constructor prop for initializing
single_set_nosearch extracted for prototype
This would simplify a lot of things.
👍 This would be great to have official support for the new option code @koenpunt is working on without having to use a separate fork.
A more modularized Chosen would let us build on things like AJAX searching or option adding without polluting the base functionality. I'm 100% in support of this general idea and this seems like a good first step. @koenpunt what else do you think needs to happen here before it's useful to you?