hig icon indicating copy to clipboard operation
hig copied to clipboard

@hig/Dropdown: The values in the text field are only displayed as a string (not as a react node)

Open jzena opened this issue 6 years ago • 3 comments

Hi team, On the next example (image below) when I use the renderOption prop and then I create a span element inside it. When I open the list element, that is rendered as expected, but when I set the value prop, the textfield only display the string value(omit the span element)

image

jzena avatar Sep 06 '18 13:09 jzena

@jzena What's the design or behavior are you trying to accomplish? Right now, the dropdown is based on the text field and was designed to represent text based data.

morrisallison avatar Sep 07 '18 17:09 morrisallison

Hi @morrisallison I'd like the following behavior: image and when I set the value prop I'd like to have something like that on the text_field: image

jzena avatar Sep 07 '18 17:09 jzena

@jzena I understand the request and I can see the value but I'm not going to prioritize this right now—we have some more pressing work at the moment. I will keep this in mind as we work on Dropdown in the future.

To support this decision I looked at other popular dropdown/select libraries (react-select, select2) and found that they don't support this either. At least I know our Dropdown isn't behind on this.

Thanks for reaching out with the request though. Please hit us up with other questions or requests.

nfiniteset avatar Sep 19 '18 15:09 nfiniteset