Autodesk / Autodesk/hig

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

Open
#1,174 3 comments 0 reactions 0 assignees View on GitHub
community feature request needs api design
Dominant language
JavaScript
Stars
193
Forks
112
PR merge metrics
No merged PRs in 30d

Description

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](https://user-images.githubusercontent.com/11335532/45160192-7333ca80-b1ae-11e8-8d9c-863f81920453.png)

Contributor guide

Open the contributing guide

Research direction

Begin with the @hig/Dropdown implementation and reproduce the renderOption/value example from the issue; no source file or test is named in the report. Trace how the selected value is displayed, then add or update relevant coverage so the selected field preserves the rendered span while the option list remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.