Skip to content

[EuiSearchBar] Conditional error tooltip #9754

Closed

Description

@weronikaolejniczak

Requestor

@kapral18, raised during the EUI v116.3.1 upgrade in Kibana (elastic/kibana#272154 discussion).

Problem Statement

As of EUI v116.3.0 (#9643), EuiSearchBar always renders its invalid query error.message inside an EuiToolTip (search_bar.tsx#L318-L320). Consumers that already render their own error UI for the same parse error now get duplicated/overlapping error surfaces, with no way to opt out of the built-in tooltip.

Proposed Solution

Make the built-in error tooltip conditional / opt-out, e.g. a prop on EuiSearchBar to disable (or customize) the internal parse-error tooltip, so consumers that surface the error themselves can avoid duplication.

Use Case

Kibana Stack Management → Advanced Settings QueryInput, which renders its own EuiFormErrorText for the same parse error (query_input.tsx#L64-L77). Applies to any EuiSearchBar consumer that displays its own error messaging.

Value / Impact

Avoids showing the same error twice (inline + tooltip), which is confusing for end users and visually overlapping. Benefits library consumers with custom error UI. Niche but affects existing Kibana usages that were correct before the EUI bump.

Urgency

Not blocking. Surfaced during the EUI v116.3.1 Kibana upgrade, which merged with a Kibana-side test/selector adjustment. Low/medium priority.

Do alternatives or workarounds exist?

Consumers can remove or adjust their own error UI (e.g. drop QueryInput's EuiFormErrorText and rely on the EUI tooltip). However, there is currently no EUI API to opt out of the built-in tooltip while keeping a custom error surface.

Related code or customizations

Additional context (Optional)

Repro: Stack Management → Advanced Settings → type an invalid query such as ? while the search bar is focused. Before the EUI bump this showed the inline Unable to parse query... error only; after, the same parse error is also shown in the EUI tooltip.

Before
advanced-settings-invalid-query-base

After
advanced-settings-invalid-query-head

Designs or Specs (Optional)

Activity

  1. added
    help wanted
    on Jun 30, 2026
  2. github-actions commented on Jun 30, 2026

    @github-actions

    👋 Thank you for your suggestion or request! While the EUI team agrees that it's valid, it's unlikely that we will prioritize this issue on our roadmap. We'll leave the issue open if you or anyone else in the community wants to implement it by contributing to EUI. If not, this issue will auto close in one year.

  3. Naveen2070 commented on Jul 1, 2026

    @Naveen2070
    Contributor

    Hi @kapral18 and team! 👋

    I've just opened a Pull Request (#9773) with a proposed fix for this issue.

    Following the suggested solution, I added an optional isInvalidTooltipDisabled boolean prop to EuiSearchBarProps
    . When set to true , the EuiSearchBar will completely bypass rendering the built-in EuiToolTip wrapper when an
    error occurs, allowing consumers (like Kibana's QueryInput ) to surface their own custom error UI without
    overlapping duplication.

    Let me know if there are any changes or tweaks you'd like me to make to the PR!

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

Metadata

Metadata

Labels

help wanted

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions