thisbeyond / solid-select

The Select component for Solid.
https://solid-select.com
MIT License
172 stars 18 forks source link

Ability to display tooltip text on hover of a select item #56

Closed md-owes closed 2 months ago

md-owes commented 3 months ago

Sometimes the Select list is populated with a very long text (for e.g. "I am a very long text that does not fit into the width of select control") and since it breaks the UI, I decided to shorten it to 16 characters and use ellipsis and hence the previous text becomes (I am a very long...). Now this shortened text fits into the width of the select control but there is no way to know the entire text unless i use browser developer tools. Hence requesting a tooltip feature to be added to select items to display the entire text when the text is shortened for display purposes.

martinpengellyphillips commented 2 months ago

Release 0.15.0 has now been published which should address this. It builds into the default style the ellipsis text support and provides a custom format function to control other elements for options, such as adding title attribute etc. It does not provide a tooltip solution directly as there are many UX specific considerations to account for there. Instead, makes it easier to add your own.