Skip to content

[EuiFilterButton] Add isClearable prop #8955

Closed as not planned
Closed as not planned

Description

@andreadelrio

Problem Statement

We're having to re-design input controls in order to introduce them in Discover. In particular we're removing the hover actions and displaying them in a different way. One of this actions is the "clear selections" action. We would like it's new location to be inside the input (in the form of a cross icon, as typically found on inputs).

We're currently hacking a solution for this which results in the clear button placed in an odd location (i.e. after the arrowDown).

Image

Proposed Solution

Implement a isClearable prop in EuiFilterButton so that the component can offer this functionality natively. The clear button should appear after the counter and before the arrowDown.

Use Case

Anywhere where controls are available: Dashboard, Discover and some solution pages.

Value / Impact

Controls are about to land (PR) in our most important application (Discover) and they will get a lot of exposure, we want the UI of these elements to feel polished and clean according to our standards.

Urgency

There's an urgency to release controls in Discover and therefore we're going with the temporary fix but it results in a very odd design. We would like to fix this from within EUI asap.

Do alternatives or workarounds exist?

No

Related code or customizations

Link to Hannah's PR to be pasted here.

Additional context (Optional)

Related to http://github.com/elastic/eui-private/issues/270

Activity

  1. Heenawter commented on Aug 8, 2025

    @Heenawter
    Contributor

    Related Kibana issue: elastic/kibana#230854

  2. weronikaolejniczak commented on Aug 11, 2025

    @weronikaolejniczak
    Contributor

    @ek-so what do you think from design perspective?

  3. ek-so commented on Aug 11, 2025

    @ek-so
    Contributor

    Hey all! I think we migh want to involve @mgadewoll — we discussed those inputs recently, and how we might make them look and behave more like inputs, rather than like buttons (as it is now), because they are buttons under the hood after all.
    This issue.

  4. ek-so commented on Aug 11, 2025

    @ek-so
    Contributor

    In general, as far as I see, @andreadelrio and I are aligned on the assumption, that those controls should look and feel like inputs for the user... but how do to it nicely on a code side, is a good question.

  5. Heenawter commented on Aug 12, 2025

    @Heenawter
    Contributor

    If it's alright with the EUI team, we can close this issue! We were able to find a better solution on the Kibana side - see elastic/kibana#230854 (comment) 🙇

  6. weronikaolejniczak commented on Aug 13, 2025

    @weronikaolejniczak
    Contributor

    @Heenawter we have an issue that @ek-so mentioned above ☝🏻 Not sure where we can prioritize it but just saying that it won't escape us! Closing the issue. Feel free to reopen if you find it still valid.

    cc @elastic/eui-team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions