You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fact, I would suggest two select2 configuration options (defaulted to false if select2 dev wanted backward compatibility) of "copyOptionClasses": true|false and "copyOptionAttributes": true|false which would do exactly that!
More copy data attribute from options, but can be interesting.
Have a way to copy class too (by option)
MakerTim
changed the title
Feature request - keep data-attr's from original select
Feature request - copy data-attr's and/or classes from original select
Sep 20, 2023
RE: Can I get a little bit more context on this feature request?
So if an option was defined as such (square instead of angle): [option class="class" data-something="yes"]
then the corresponding would look like this: [li class="select2-results__option class" data-something="yes"]
Context
You can hide options via CSS,
display: none
.But when using select2 it has no effect.
My request is to add the data-attr's so
Preview
Codebin
https://jsbin.com/sicexew/edit?html,css,js,output
The text was updated successfully, but these errors were encountered: