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

Could someone add support for small images #83

Closed
xvisor16 opened this issue Jun 7, 2023 · 1 comment
Closed

Could someone add support for small images #83

xvisor16 opened this issue Jun 7, 2023 · 1 comment

Comments

@xvisor16
Copy link

xvisor16 commented Jun 7, 2023

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:

image

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

@xvisor16
Copy link
Author

xvisor16 commented Jun 7, 2023

Sorry put this in the wrong place!

@xvisor16 xvisor16 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 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

1 participant