select2 icon indicating copy to clipboard operation
select2 copied to clipboard

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

Open MakerTim opened this issue 2 years ago • 4 comments

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

MakerTim avatar May 19 '23 09:05 MakerTim

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!

AzzaAzza69 avatar Jun 08 '23 11:06 AzzaAzza69

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

Have a way to copy class too (by option)

Shnoulle avatar Sep 18 '23 10:09 Shnoulle