I have a dynamically created set of option
s, some of which may have a length of over 15 symbols.
The select
component has a custom button to reset it, which normally looks like
When the option
value is more that 15 symbols though, it looks awful
I was looking for a solution to change the value, but only if the option is selected.
The one I came up with makes the selected value look okay, but it also changes the way value is display in select window:
{title.length > 15 ? `${title.slice(0, 14)}...` : title}
But it changes the way it is displayed in the select window:
So I was wondering if there is a solution to set another value to option only when it is selected, i.e. to not affect its value in the select window.