Skip to content

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 765b083 commit 2f0212f
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 2f0212f

Please sign in to comment.