Open
Description
It would be great if we could adjust the icon being rendered in renderLeftIcon and renderRightIcon based on the item in the menu. My use case is that I have a color associated with each dropdown item, and I want to show that color as a small square next to the text. The render icon properties seem like the perfect opportunity to do this, but they only have a single parameter of visible
, which doesn't help here. I understand that there's a renderItem option, but that only changes the display of the items in the dropdown itself, not the selected item.
Something like this:
<Dropdown data={dropdownData} labelField={"name"} renderLeftIcon={(item) => <Icon source={'square'} size={8} color={item.color}/>} valueField={'id'} />
Metadata
Assignees
Labels
No labels