Skip to content

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

@acstll

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".

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