diff --git a/client/src/containers/Dialogs/CurrencyFormDialog/CurrencyFormFields.js b/client/src/containers/Dialogs/CurrencyFormDialog/CurrencyFormFields.js index beb88ef24..56ecb2276 100644 --- a/client/src/containers/Dialogs/CurrencyFormDialog/CurrencyFormFields.js +++ b/client/src/containers/Dialogs/CurrencyFormDialog/CurrencyFormFields.js @@ -19,6 +19,17 @@ export default function CurrencyFormFields() { const { isEditMode } = useCurrencyFormContext(); + // Filter currency code + const filterCurrencyCode = (query, currency, _index, exactMatch) => { + const normalizedTitle = currency.name.toLowerCase(); + const normalizedQuery = query.toLowerCase(); + if (exactMatch) { + return normalizedTitle === normalizedQuery; + } else { + return normalizedTitle.indexOf(normalizedQuery) >= 0; + } + }; + return (
@@ -27,7 +38,10 @@ export default function CurrencyFormFields() { field: { value }, meta: { error, touched }, }) => ( - +