Skip to content

Commit

Permalink
UIPQB-55: Regular expressions are incorrect for contains and starts_w…
Browse files Browse the repository at this point in the history
…ith operators
  • Loading branch information
UladzislauKutarkin committed Oct 10, 2023
1 parent 252a6eb commit 0168db0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
* [UIPQB-48](https://issues.folio.org/browse/UIPQB-48) "Show columns" dropdown doesn't fit in the screen.
* [UIPQB-47](https://issues.folio.org/browse/UIPQB-47) 400 error blocks save or further action in query builder.
* [UIPQB-51](https://issues.folio.org/browse/UIPQB-51) Dropdown typeahead should use contains not starts with.
* [UIPQB-55](https://issues.folio.org/browse/UIPQB-55) Regular expressions are incorrect for contains and starts_with operators
2 changes: 1 addition & 1 deletion src/QueryBuilder/QueryBuilder/helpers/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const sourceToMongoQuery = (source) => {
const escapeRegex = (value) => {
const escapedValue = value.replace(/[/\-\\^$*+?.()|[\]{}]/g, '\\$&');

return `^${escapedValue}`;
return `${escapedValue}`;
};

source.forEach((item) => {
Expand Down

0 comments on commit 0168db0

Please sign in to comment.