Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - copy data-attr's and/or classes from original select #6254

Open
MakerTim opened this issue May 19, 2023 · 2 comments
Open

Comments

@MakerTim
Copy link

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

image
image

Codebin

https://jsbin.com/sicexew/edit?html,css,js,output

@AzzaAzza69
Copy link

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!

@Shnoulle
Copy link
Contributor

More copy data attribute from options, but can be interesting.

Have a way to copy class too (by option)

@MakerTim 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants