From 29bd32af2c3b36022b8487184f12ab2913a9fcaa Mon Sep 17 00:00:00 2001 From: Manan Date: Mon, 18 Sep 2023 12:27:35 +0530 Subject: [PATCH] trim currency search --- src/pages/iou/IOUCurrencySelection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 80f4a5c17e23..4143294f1df2 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -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;