I have a project where the select element is getting some css value that ultimately clash with select2 styling. The thing is those classes need to be assigned to any select that isn't Select2 so I've been looking at ways of changing what gets set when I ran across containerCssClass. This seems to be the perfect way to filter out any undesireable css classes, however, it seems to be set in select2.js:
containerCssClass: ':all:',
Is this entirely hardcoded or is there a way to override this? data-* attributes don't seem to do the trick. If I need to have a local copy of select2.js that'll do, but gets potentially messy.
Hi all,
I have a project where the
select
element is getting some css value that ultimately clash withselect2
styling. The thing is those classes need to be assigned to anyselect
that isn't Select2 so I've been looking at ways of changing what gets set when I ran acrosscontainerCssClass
. This seems to be the perfect way to filter out any undesireable css classes, however, it seems to be set inselect2.js
:Is this entirely hardcoded or is there a way to override this?
data-*
attributes don't seem to do the trick. If I need to have a local copy ofselect2.js
that'll do, but gets potentially messy.Thanks!