Skip to content

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

Description

@acstll

Describe the bug

When searching in enabled, the onChange callback passed in the the search prop only fires for the default searchFormat, which is eql.

This makes it impossible to use custom search logic combined with plain text.

Impact and severity

It's blocking fixing a bug in Kibana: https://github.com/elastic/observability-dev/issues/4787

To Reproduce

It's easy to see in the source code, the search.onChange callback not being called for the plain text method:

onPlainTextSearch = (searchValue: string) => {
const escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
const finalQuery = `"${escapedQueryText}"`;
this.setState({
query: EuiSearchBar.Query.parse(finalQuery),
});
};

whereas it's called for the default format (in the method above), as expected.

Expected behavior

The onChange to also fire with searchFormat="text".

Activity

  1. added
    ⚠️ needs validation
    on Sep 15, 2025
  2. added theissue type on Sep 15, 2025
  3. removed
    ⚠️ needs validation
    on Sep 15, 2025
  4. self-assigned this
    on Sep 15, 2025
  5. acstll commented on Oct 17, 2025

    @acstll
    ContributorAuthor

    I'm re-opening this, because there's 2 new, separate bugs that have appeared after the initial fix in #9059, namely:

    • search.defaultQuery is not being passed down to the search bar, so it has no effect
    • EQL syntax errors e.g. "or " without quotes, are uncaught when controlling the search bar, aka passing the query text to search.query and handling it in the onChange callback; this happens regardless of the value in searchFormat → when eql it should handle it as expected, putting the input in an invalid state, when text it should just ignore it (don't parse it) (screenshot)
    Image
  6. reopened this on Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions