I'm trying to create a dropdown/select with semantic ui and React, and I want it to display check-mark on selected item. my current code is :
groupSelector() {
let groups = Object.keys(this.state.data).map((val, index) => {
return {
text: val,
value: index,
image: (
<span style={{ color: this.state.data[val].Color }}>★</span>
)
};
});
return (
<Dropdown
placeholder="choose group"
id="dropdown"
selection
fluid
options={groups}
onChange={(e, { value }) => {
this.setGroupToShow(value, e);
}}
/>
);
}
help anyone?