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".
Describe the bug
When searching in enabled, the
onChangecallback passed in the thesearchprop only fires for the defaultsearchFormat, which iseql.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.onChangecallback not being called for the plain text method:eui/packages/eui/src/components/basic_table/in_memory_table.tsx
Lines 543 to 549 in 0c43f16
whereas it's called for the default format (in the method above), as expected.
Expected behavior
The
onChangeto also fire withsearchFormat="text".