Skip to content

[React 19][EuiFieldSearch] Console Error reported in React19 dev mode #9587

Open

Description

@a03nikki

Describe the bug
On a custom application that uses this library and the Renovate bot, the React version was updated. Then I started seeing errors in the Turbopack helper when the application was ran using npm run dev.

Impact and severity
The search box seems to function-ish but I did not test it extensively.

Environment and versions

  • EUI version: 114.1.0
  • React version: 19.2.4
  • Kibana version (if applicable): N/A, custom app
  • Browser: Island Version 1.88.23 Chromium: 146.0.7680.178 (Official Build) (arm64)
  • Operating System: MacOS Tahoe 26.4

Minimum reproducible sandbox
https://codesandbox.io/p/sandbox/3mwtt9

To Reproduce
Render the page and check for console errors.

Expected behavior
The error does not pop-up.

Screenshots (Optional)

Image

Additional context (Optional)

Error Type: Console Error

Error Message:
Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.

Next.js version: 16.2.3 (Turbopack)

Activity

  1. added theissue type on Apr 10, 2026
  2. added
    ⚠️ needs validation
    on Apr 10, 2026
  3. JasonStoltz commented on Apr 20, 2026

    @JasonStoltz
    Contributor

    @a03nikki We don't support React 19 yet. Thanks for reporting this and adding it to #8720.

    We'll track this and close it out with this Epic when we get there. Is there any particular urgency for you to have this fixed, is it OK to wait until then?

  4. addonion commented on May 13, 2026

    @addonion

    @JasonStoltz since you commented on the React 19 support status here, could you please confirm whether this scope makes sense?

    I took a first pass at a narrow validation for this issue.

    Based on the local repro and investigation, the warning appears to come from the EuiFieldSearch path through EuiValidatableControl, where the wrapped child ref is read in a way that triggers React 19's dev warning.

    Proposed scope:

    • Fix only the EuiFieldSearch / EuiValidatableControl path reported in this issue.
    • Add a targeted unit test that verifies the React 19-style props.ref path without reading the deprecated element.ref getter.
    • Avoid claiming full React 19 support for EUI; this would remain a narrow compatibility bugfix under [Epic] React 19 support #8720.
    • Leave broader element.ref audit items, such as other shared helper paths, for a follow-up unless maintainers prefer to include them here.

    Additional context: a similar issue was already handled in MUI. In MUI issue #42604, the same React 19 warning is described: Accessing element.ref was removed in React 19, with the example pointing to children.ref access. The related fix, MUI PR #42818, addressed this class of problems by moving toward the React 19-compatible props.ref approach. So the proposed EUI fix follows a pattern already used by another major React UI library, rather than introducing a custom workaround.

    Questions before I open a PR:

    1. Is this narrow scope acceptable for [React 19][EuiFieldSearch] Console Error reported in React19 dev mode #9587?
    2. Should the PR stay limited to EuiValidatableControl, or should it also cover nearby shared ref helpers?
    3. For validation, is a local React 19 repro plus targeted unit coverage enough, or would you prefer a Kibana staging check as well?
  5. a03nikki commented on May 18, 2026

    @a03nikki
    Author

    Is there any particular urgency for you to have this fixed, is it OK to wait until then?

    @JasonStoltz : At this time, there is not urgency to get the custom application onto React 19. I will come back and comment on this issue if it becomes urgent due to another library dependency.

  6. github-actions commented on Nov 15, 2026

    @github-actions

    👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

  7. added
    stale-issue
    on Nov 15, 2026
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

    stale-issue⚠️ needs validation

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions