eui icon indicating copy to clipboard operation
eui copied to clipboard

[EuiComboBox] Clearable functionality should work during text search/typing

Open cchaos opened this issue 3 years ago • 5 comments

At least with single selection turned on, the clearable button only exists when you have an item selected. But to easily clear something that was typed, it would be good to have the clearable button show up before a selection has been made, but when there is text in the input.

There is also a bug where if you clear the current selection by typing to find a new item, the clearable button still exists, but clicking it doesn't actually clear anything.

https://user-images.githubusercontent.com/549577/146972233-4710b835-aeeb-4c5d-be4c-a8167772008d.mp4

cchaos avatar Dec 21 '21 17:12 cchaos

The clear functionality in EuiComboBox does not clear invalid options: eui

I discovered this through this bug report: elastic/kibana#120609

We have a reset button that "resets" the selectedOptions prop. However, this does not clear invalid options either. I'm not sure if fixing the clear problem will fix our problem or if we need a clear handler?

Originally posted by @stephmilovic in https://github.com/elastic/eui/issues/5500

cchaos avatar Dec 21 '21 21:12 cchaos

@cee-chen Any idea if this will be fixed by https://github.com/elastic/eui/issues/2841?

JasonStoltz avatar May 14 '24 15:05 JasonStoltz

No, EuiComboBox will likely need its own custom input still, so will need some manual fixing.

cee-chen avatar May 14 '24 15:05 cee-chen

I cannot find this experience in the dashboards/lens/discover UI anywhere. Do you know if this has been implemented anywhere? Otherwise I think it's fine postponing it until there is a real use case.

teresaalvarezsoler avatar May 30 '24 07:05 teresaalvarezsoler

@timductive Did you have a specific location this is used in mind?

JasonStoltz avatar May 30 '24 14:05 JasonStoltz