Closed matiazar closed 7 years ago
I had the same issue - make sure you're using select2.full, like the examples - and this will work
i had to change the .select2 class to .select2b for this to work
This might be so much noise on a dead thread, but I used "select2" as my class to initialize the select2 controls on, and that was fine, right up until I set the containerCssClass to ":all:". It was at this point it applied a "select2" class to the select2 container and broke things. @matiazar's answer didn't make sense initially but once I played with it, it made total sense.
Im using select2.full.js Select2 4.0.3 and Css 0.1.0-beta.8
I put this on select2 config but the select box doesnt open. doesnt show the options containerCssClass: ':all:'
the problem that I found is that select has a class called "select2" so when document loads $(".select2").select2({ width: '100%', placeholder: function(){ $(this).data('placeholder'); }, containerCssClass: ':all:', }); it copies the select2 class to the container and that makes all broken. there is another way to make this without the :all: class ?
on the examples page, this is not happening. Why ? Thanks !!!