-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdown: Icon isn't displayed in selection #1147
Comments
WorkaroundI'm a little torn on which way this should go. A Dropdown option ( const options = [
{ value: '0', text: <span><Icon name='man' /> Man</span> },
{ value: '1', text: <span><Icon name='woman' /> Woman</span> },
{ value: '2', text: <span><Icon name='genderless' /> Other</span> },
] This will render what you are looking for. Forked example http://codepen.io/levithomason/pen/apNOZp. Proper fixThat said, I think your use case is intuitive and should probably work. What we'd need to do is render the This approach will need to consider the fact that the Likely, the proper implementation here will be to take the active item's props, remove the const { children, content, ...rest } = activeItem.props
const _text = DropdownItem.create(rest).props.children |
Thank you for your quick feedback. Your workaround does works but generates the following warnings :
I will try to put together a fix as you suggested and then open a pull request. |
Thanks much. Note that the prop warnings are nonconsequential. However, we certainly want to fix them :) |
I have some trouble implementing this. It's looks like in this code: const _text = DropdownItem.create(rest).props.children children is I don't want to duplicate some of the logique from |
If you'd like to open a PR it may get more attention since there will be some code to review / test. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
There has been no activity in this thread for 90 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one. However, PRs for this issue will of course be accepted and welcome! If there is no more activity in the next 90 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks! |
Is there any way to get a visible icon while remaining searchable? As soon as I provide an element as text I can't search it anymore. |
There has been no activity in this thread for 180 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one. However, PRs for this issue will of course be accepted and welcome! If there is no more activity in the next 180 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks! |
I am also interested in a fix for this. |
@layershifter thanks for the Flag and Image support, but I think Icon support was lost in the last commit of #4003. Was this intentional or is there a chance for a fix? |
Can you please create an issue for the problem that you mentioned? 🙏 |
Steps
Expected Result
The icon and text should be displayed as the selected option
Actual Result
Only the text is displayed , not the icon
Version
v0.63.5
Testcase
semantic-ui codepen
semantic-ui-react codepen
The text was updated successfully, but these errors were encountered: