Skip to content

Conversation

@acstll
Copy link
Contributor

@acstll acstll commented Oct 24, 2025

Summary

Closes #9019 (see #9019 (comment))

This addresses 2 issues with EuiInMemoryTable when used with plain text, namely searchFormat="text", it:

  • enables "controlled" support via the search.query prop
  • ensure search.defaultQuery is being passed to the search box

It's a follow-up for a previous fix in #9059

Why are we making this change?

To fix a bug, and to unblock fixing another bug in Kibana.

Impact to users

🟢 Since this is a bug fix impact should just be positive, but tests may fail expecting the old broken behavior. However, no instances of searchFormat="text" can be found in Kibana with a simple search. And these changes should not affect the default searchFormat="eql".

QA

Suggestion

The bug happens when the component attempts to parse the search value as EQL syntax despite searchFormat being text, although it shouldn't, as expressed in the description of the searchFormat prop.

To reproduce it, you can:

This test story should work as expected in this branch.

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
    • If the changes unblock an issue in a different repo, smoke tested carefully (see Testing EUI features in Kibana ahead of time)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@acstll acstll self-assigned this Oct 24, 2025
@acstll acstll added skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) and removed skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) labels Oct 24, 2025
- don't throw when an invalid query like "or" is passed in search.query
- ensure controlled behavior by ensuring search.query is passed down to the search bar
@acstll acstll force-pushed the in-memory-table-plain-text-onchange-9019-2 branch from ebe0bf2 to 9967c96 Compare November 19, 2025 12:13
@acstll acstll marked this pull request as ready for review November 19, 2025 17:37
@acstll acstll requested a review from a team as a code owner November 19, 2025 17:37
Copy link

@rmyz rmyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested against local kibana with elastic/kibana#233836 and it works fine, thanks!

@mgadewoll mgadewoll self-requested a review November 24, 2025 09:43
Copy link
Contributor

@mgadewoll mgadewoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ The updated search.query and search.defaultQuery props work as expected:

  • query no longer results in an error for searchFormat="text"
  • defaultQuery is properly applied

I have one doubt about a possible edge case, otherwise the changes LGTM.

@acstll acstll requested a review from mgadewoll November 25, 2025 13:59
namely handling also defaultQuery, and also improve JSDoc
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @acstll

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @acstll

@acstll acstll requested a review from mgadewoll November 26, 2025 15:45
Copy link
Contributor

@mgadewoll mgadewoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Thanks for the additional changes! The code LGTM and the updated search.query and search.defaultQuery work as expected 👍

@acstll acstll merged commit 5a429b4 into elastic:main Nov 26, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiInMemoryTable] search.onChange callback not firing when searchFormat="text"

5 participants