Skip to content

Commit

Permalink
ensure regex works for filter with optional multiple spaces (#93071)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezmelissa87 authored Mar 2, 2021
1 parent 319ad55 commit 36523bb
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 36523bb

Please sign in to comment.