Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
ensure regex works for filter with optional multiple spaces (elastic#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezmelissa87 authored Mar 2, 2021
1 parent 9fd352b commit 37c0dd0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const ExplorationQueryBar: FC<ExplorationQueryBarProps> = ({

const searchChangeHandler = (q: Query) => setSearchInput(q);

const regex = useMemo(() => new RegExp(`${filters?.columnId}\s?:\s?(true|false)`, 'g'), [
const regex = useMemo(() => new RegExp(`${filters?.columnId}\\s*:\\s*(true|false)`, 'g'), [
filters?.columnId,
]);

Expand Down

0 comments on commit 37c0dd0

Please sign in to comment.