Skip to content

Commit

Permalink
Merge pull request #27644 from gadhiyamanan/fix-26375
Browse files Browse the repository at this point in the history
Trim currency search
  • Loading branch information
chiragsalian authored Sep 20, 2023
2 parents 5ec6105 + 29bd32a commit 09fe428
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 @@ -104,7 +104,7 @@ function IOUCurrencySelection(props) {
};
});

const searchRegex = new RegExp(Str.escapeForRegExp(searchValue), 'i');
const searchRegex = new RegExp(Str.escapeForRegExp(searchValue.trim()), 'i');
const filteredCurrencies = _.filter(currencyOptions, (currencyOption) => searchRegex.test(currencyOption.text));
const isEmpty = searchValue.trim() && !filteredCurrencies.length;

Expand Down

0 comments on commit 09fe428

Please sign in to comment.