-
Notifications
You must be signed in to change notification settings - Fork 839
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] Adding hit enter badge #3782
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_3782/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3782/ |
1 similar comment
Preview documentation changes for this PR: https://eui.elastic.co/pr_3782/ |
src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also added the badge to Add each item separated by {delimiter}" but I can't test this (Is this code exception done properly?)
Yeah I'm seeing that there is a bug that where you can paste a delimited list and if you click outside of the combobox it will create each option properly, but simply hitting enter only take the last item. Is this something you can look into?
It seems like there's extra space below the custom option text.
Can you run through some of the ComboBox examples to make sure their settings are appropriate? For example, the Virtualized example has a custom placeholder saying "Select or create options" but that example doesn't have the ability to add a custom option.
Be sure not to show the badge on disabled items
src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx
Outdated
Show resolved
Hide resolved
src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx
Outdated
Show resolved
Hide resolved
src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx
Outdated
Show resolved
Hide resolved
…ons_list.tsx Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Preview documentation changes for this PR: https://eui.elastic.co/pr_3782/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3782/ |
@chaos I fixed the issues you pointed out:
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_3782/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM. Tested in Chrome, Safari, and FF. I also tested the filter group buttons to make sure they were rendering properly with the span. Just waiting on that returnKey
icon, then this is good to go.
Preview documentation changes for this PR: https://eui.elastic.co/pr_3782/ |
Summary
This PR introduces a hit enter badge on the right side of a EuiComboBox option. The idea of the badge is to help users to know that they can press enter to add an option.
The idea of adding this badge started on #3702.
Add {searchValue} as a custom option
. I also added the badge toAdd each item separated by {delimiter}"
but I can't test this (Is this code exception done properly?)Checklist
[ ] Checked in mobile[ ] Props have proper autodocs[ ] Added documentation[ ] Checked Code Sandbox works for the any docs examples[ ] Checked for breaking changes and labeled appropriately