Skip to content

Commit

Permalink
Fix currency search
Browse files Browse the repository at this point in the history
  • Loading branch information
iwiznia committed Jan 20, 2023
1 parent 91c7467 commit 90dcb3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/iou/IOUCurrencySelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class IOUCurrencySelection extends Component {
*/
changeSearchValue(searchValue) {
const currencyOptions = this.getCurrencyOptions(this.props.currencyList);
const searchRegex = new RegExp(searchValue, 'i');
const searchRegex = new RegExp(searchValue.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'i');
const filteredCurrencies = _.filter(currencyOptions, currencyOption => searchRegex.test(currencyOption.text));

this.setState({
Expand Down

0 comments on commit 90dcb3f

Please sign in to comment.