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
Currently, if in a Select component multiple items are selected, the values show up delimited only by a blank. Please change this to allow other characters to be delimiters, too - at least a comma would be desirable (or give an option to more clearly distinguish between a blank used as a delimiter and a regular blank as part of a selectable item).
This is important if the selected items themselves contain blanks thus causing confusion because it is not directly clear, whether the blank is part of the selected item or in fact a delimiter between two separate items.
The text was updated successfully, but these errors were encountered:
Ri-gers
changed the title
Allow Changing Delimiter for Select Element When Set to multiselect
Allow Changing Delimiter for Select Component When Set to multiselect
Nov 13, 2024
The select is implemented to actually allow anything to be used to represent the selected option, and instead of forcing one way or another to do so it is left to the user to decide what he wants to display, the implementation will use what ever component is defined by the select option
/** * Creates a new SelectOption with the provided key, value, component supplier, and menu item * supplier. * * @param key The unique key for the option. * @param value The value associated with the option. * @param componentSupplier The supplier for the option's component. * @param menuItemSupplier The supplier for the option's menu item. */publicSelectOption(
Stringkey,
Vvalue,
OptionSupplier<DivElement, V> componentSupplier,
OptionSupplier<AbstractMenuItem<V>, V> menuItemSupplier) {
super(key, value, componentSupplier, menuItemSupplier);
}
check out this constructor which what other constructors delegate to, notice that there is no definition for a delimiter, if you follow up with that code you it will append the option component as is.
In short just define your own SelectOption to do what you want.
Currently, if in a Select component multiple items are selected, the values show up delimited only by a blank. Please change this to allow other characters to be delimiters, too - at least a comma would be desirable (or give an option to more clearly distinguish between a blank used as a delimiter and a regular blank as part of a selectable item).
This is important if the selected items themselves contain blanks thus causing confusion because it is not directly clear, whether the blank is part of the selected item or in fact a delimiter between two separate items.
The text was updated successfully, but these errors were encountered: