You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Id suggest to add an option to pass custom render components for labels as props.
For example, if I want to display some info button or custom styling for different items of different types. I'd like to control the labels.
What do you say, guys?
The text was updated successfully, but these errors were encountered:
While that is a mostly reasonable request, we are using the HTML <select> tag for much of the functionality in this component. The <option> tags are used to display all of the options, and the permitted content of these tags are only text. Similarly, the label property of an <optgroup> naturally will only allow text.
Therefore, in order to have custom components for the labels, we would have to rewrite parts of the library to not use the native HTML <select>, but use some custom machination that emulates its behavior and fires all appropriate events. Then arbitrary components would be allowed for the labels.
Unless someone is willing to submit a PR that overhauls the whole <select>, <optgroup>, and <option> interaction with something custom, I will likely not add this enhancement.
Id suggest to add an option to pass custom render components for labels as props.
For example, if I want to display some info button or custom styling for different items of different types. I'd like to control the labels.
What do you say, guys?
The text was updated successfully, but these errors were encountered: