bluzky / nice-select2

A lightweight vanilla javascript library that replaces native select elements with customizable dropdowns
https://bluzky.github.io/nice-select2/
MIT License
370 stars 61 forks source link

Add inline element to show extra information #67

Closed hesslau closed 6 months ago

hesslau commented 1 year ago

The \<span> will float to the right and contain whatever is set in the original option's data-extra field.

<option data-extra="bar">foo</option>

will turn to

<li>foo<span class="extra">bar</span></li>

and will look similar to this