I've been debugging why my select2 autocomplete-light controls stopped working, they are select2 initialized controls but no remote call is made to load options and only an empty dropdown is shown when i open it.
It appears that this is because the select2 control is initialized first by autocomplete.init.js and then reinitialized as a regular select2 control; without the ajax options.
This happens because i obviously need to serve many pages on the website and only some are autocomplete fields, so i packages select2.js in my own js/lib and basically all $("select") items are initialzed...
My question is what the best practice is to combine the two?
I've been debugging why my select2 autocomplete-light controls stopped working, they are select2 initialized controls but no remote call is made to load options and only an empty dropdown is shown when i open it.
It appears that this is because the select2 control is initialized first by autocomplete.init.js and then reinitialized as a regular select2 control; without the ajax options.
This happens because i obviously need to serve many pages on the website and only some are autocomplete fields, so i packages select2.js in my own js/lib and basically all $("select") items are initialzed...
My question is what the best practice is to combine the two?
Paul