Hi, I would like to have an icon selector. We now use different JS script for this while we use select2 for all other things. Now i've experimented a little DevTools and found it rather easy to add.
If I add (img src="/imagepath/imagename.png" class="me-3" style="max-height:20px;max-width=20px;") (replaced <> for () to not launch the code execution) to the LI's in the select2-results just before the name of the line, this actually looks perfect!
It would be amazing if we could put the url to the image in as data-select2-img for every option and get the image displayed in front of the text.
Adding the same line to the span select2-selection__rendered just before the name makes it all look like this:
I hope you like this too and could add it please so we can just use select2 for everything! Thnx a lot in advance.
Hi, I would like to have an icon selector. We now use different JS script for this while we use select2 for all other things. Now i've experimented a little DevTools and found it rather easy to add.
If I add (img src="/imagepath/imagename.png" class="me-3" style="max-height:20px;max-width=20px;") (replaced <> for () to not launch the code execution) to the LI's in the select2-results just before the name of the line, this actually looks perfect!
It would be amazing if we could put the url to the image in as data-select2-img for every option and get the image displayed in front of the text.
Adding the same line to the span select2-selection__rendered just before the name makes it all look like this:
I hope you like this too and could add it please so we can just use select2 for everything! Thnx a lot in advance.
Peter