Skip to content

Commit

Permalink
Merge pull request #10613 from zereraz/iou-currency-search
Browse files Browse the repository at this point in the history
Fix search bug in IOU currency selector
  • Loading branch information
puneetlath authored Sep 4, 2022
2 parents 847e0af + 6fc854e commit f573a1e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ function getHeaderMessage(hasSelectableOptions, hasUserToInvite, searchValue, ma
*/
function getCurrencyListForSections(currencyOptions, searchValue) {
const filteredOptions = _.filter(currencyOptions, currencyOption => (
isSearchStringMatch(searchValue, currencyOption.searchText)));
isSearchStringMatch(searchValue, currencyOption.text)));

return {
// returns filtered options i.e. options with string match if search text is entered
Expand Down
1 change: 0 additions & 1 deletion src/pages/iou/IOUCurrencySelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class IOUCurrencySelection extends Component {
getCurrencyOptions() {
return _.map(this.props.currencyList, (currencyInfo, currencyCode) => ({
text: `${currencyCode} - ${CurrencySymbolUtils.getLocalizedCurrencySymbol(this.props.preferredLocale, currencyCode)}`,
searchText: `${currencyCode} ${currencyInfo.symbol}`,
currencyCode,
keyForList: currencyCode,
}));
Expand Down

0 comments on commit f573a1e

Please sign in to comment.