BVSelect-VanillaJS
BVSelect-VanillaJS copied to clipboard
Suggestion - Setting for custom output elements
First of all, thank you for this awesome class.
I have a request / suggestion for a future enhancement: It would be nice to be able to overrule the html output via the settings.
For example: I stumbled upon a performance issue when dealing with a list of 1500 items including image previews. Allthough the image are only a few kb, i t's quite a performance hit. Therefor I needed to lazy-load them. To be able to do that I had to modify the source code.
// Check for Attachment
if (optionImg) {
var has_attachment = "<img data-src=" + optionImg + " class='lazyload'>";
}
No big deal ofcourse, but it would be super nice if such alteration could be added to the settings object.
Hey there!
It is actually a really good sugestion, it might take a while since im running short on time, but i will do that. Be welcome to open a PR!
Have a nice day!
Thanks in advance! Great to here you like such a feature.
Like you, I'm short on time too. If I'm more or less back on schedule I can look into opening a PR.