[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
cchaos
left a comment
There was a problem hiding this comment.
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/ |
cchaos
left a comment
There was a problem hiding this comment.
👍 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