-
Notifications
You must be signed in to change notification settings - Fork 842
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
[EuiComboBox] Allow rendering icon for the chosen option #5628
Comments
Hi @mbondyra, A pattern that we've been using in our Elastic products is to show the selected icon in a You can take a look at the code on the following CodeSandbox: https://codesandbox.io/s/icon-selection-with-euicombobox-qe384. I think this solution works but is not ideal and obvious for EUI consumers. So not sure this feature request is something that we want to allow in EuiComboBox or to provide a search functionality in EuiSuperSelect. @chandlerprall and @thompsongl might know better what's the future plan for these components. Also because this is a pattern that our consumers normally search we should consider adding it to our documentation. |
Oh wow, I think it will work great for our case! @MichaelMarcialis, could you confirm we are ok with the icon in |
Thanks @miukimiu and @mbondyra! I just now saw that Maps uses this pattern for their icon selector. I'm good with adopting this approach in Lens as well. |
This is also a duplicate of #2358, but since the screenshot in that issue is broken and this one at least indicates a current workaround, I'll close the old one. I do think we should consider building in a custom render option to the component at some point, so we should keep this open. Probably capture it during the EuiSelectable conversion and to match EuiSuperSelect. |
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
Still valid |
Closing in favor of #2358 |
This is the use case we have for Lens. We generate the Icon list, but the selected Item doesn't show the preview of the icon.
Could we somehow enable it, either by adding a custom
renderSelectedOption
prop or specifically passingicon
insideselectedOptions
?The text was updated successfully, but these errors were encountered: