Skip to content

[EuiInMemoryTable] Syntax error when searching with special characters #7160

@cee-chen

Description

@cee-chen

Problem

See elastic/kibana#138499

The security team is using our in memory table's built-in search API for what's essentially plain text search. Unfortunately, some of the strings they're searching for have special characters in them, and the underlying EuiSearchBar component that the table uses throws a syntax error when the search string contains a special character.

Possible solutions

  1. Addressing within EuiSearchBar: one approach could be something similar to what was done in [EuiSearchBar] Automatically wrap special characters (that aren't used in EQL syntax) in quotes #6356 (NOTE: this auto-escaping was only performed for terms/types and not for top-level searches).

  2. Addressing within EuiInMemoryTable: essentially the use-case for the above Kibana issue doesn't need the EQL behavior of EuiSearchBar whatsoever. We could consider adding a prop to the search obj that allows consumers to specify they simply want to use a plaintext EuiFieldSearch component instead of the full-blown EQL syntax, and search based on that.

Timeline

Hoping to pick this up during my support week this week, but if not, we should triage priority at our next grooming meeting

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions