Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiInMemoryTable] Allow consumers to use non-EQL plain text search with special characters #7175

Merged
merged 9 commits into from
Sep 18, 2023
6 changes: 5 additions & 1 deletion src/components/basic_table/in_memory_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,13 @@ export class EuiInMemoryTable<T> extends Component<
let searchBar: ReactNode;

if (searchPlainText) {
const _searchBoxProps = (search as EuiSearchBarProps)?.box || {}; // Work around | boolean type
const { schema, ...searchBoxProps } = _searchBoxProps; // Destructure `schema` so it doesn't get rendered to DOM
cee-chen marked this conversation as resolved.
Show resolved Hide resolved

searchBar = (
<EuiSearchBox
query="" // Unused, passed to satisfy Typescript
{...(search as EuiSearchBarProps)?.box}
{...searchBoxProps}
onSearch={this.onPlainTextSearch}
/>
);
Expand Down Expand Up @@ -692,6 +695,7 @@ export class EuiInMemoryTable<T> extends Component<
tableLayout,
items: _unuseditems,
search,
searchPlainText,
onTableChange,
executeQueryOptions,
allowNeutralSort,
Expand Down