Picker Item with dangerouslySetInnerHTML #1662
Answered
by
LFDanLu
ZoltanSzilagyiCse
asked this question in
Q&A
-
Is it possible to use Code: <Picker aria-label="X axis">
{getInputFeatures()
.flatMap(input => input.inputs)
.map(input => (<Item key={input.id} textValue={input.name}>
<div dangerouslySetInnerHTML={{__html: input.name}}/>
</Item>))})}
</Picker> The data: {
"inputs":[
{
"id":"Lambda1",
"name":"λ<sub>1</sub>"
},
{
"id":"Lambda2",
"name":"λ<sub>2</sub>"
},
{
"id":"Mu",
"name":"µ"
},
{
"id":"c",
"name":"c"
},
{
"id":"t",
"name":"t"
},
{
"id":"r",
"name":"r"
},
{
"id":"n",
"name":"n"
}
]
} |
Beta Was this translation helpful? Give feedback.
Answered by
LFDanLu
Mar 4, 2021
Replies: 1 comment 1 reply
-
@ZoltanSzilagyiCse Can you try wrapping the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ZoltanSzilagyiCse
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ZoltanSzilagyiCse Can you try wrapping the
<div dangerouslySetInnerHTML={{__html: input.name}}/>
within a<Text>
(https://react-spectrum.adobe.com/react-spectrum/Text.html)? This allows the propergrid-area
to be set on the element wrapping the text, positioning the element into the appropriate grid section