lekoala/bootstrap5-tags

Pass through the title attribute for tooltips

tim1mw opened this issue · 2 comments

I have a use case where I need to pass through the title attribute to show tooltips against the dropdown list, however the title attribute seems to get lost. I've had a dig in the code and came up with a very simple patch (attached) that will take the title from the original <option> element and apply it to the containing <li> element of the tag list.

I'm using the <li> instead of the underlying <a> because the tooltips don't work on the <a> tag if the option has been disabled. I'm using the tooltip to explain why the option has been disabled so this is important.

title.patch.txt

oh i see
never thought of that

i did this:
a668ad2

it basically means the tooltip will appear on the tag and while hovering in the menu
seems good to me :)
what do you think ?

closing :)