From 8b3e4c50e56b295bf912004918bb23a346de5475 Mon Sep 17 00:00:00 2001 From: Peter Hellstrand Date: Thu, 28 Nov 2024 13:44:23 +0100 Subject: [PATCH] fix(ffe-account-selector-react): format account number in drodown --- .../src/account-selector/AccountSelector.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ffe-account-selector-react/src/account-selector/AccountSelector.tsx b/packages/ffe-account-selector-react/src/account-selector/AccountSelector.tsx index 5ddf8e40f4..7cc2917868 100644 --- a/packages/ffe-account-selector-react/src/account-selector/AccountSelector.tsx +++ b/packages/ffe-account-selector-react/src/account-selector/AccountSelector.tsx @@ -2,7 +2,11 @@ import React, { AriaAttributes, useState } from 'react'; import classNames from 'classnames'; import { AccountDetails } from './AccountDetails'; import { Account, Locale } from '../types'; -import { balanceWithCurrency, formatIncompleteAccountNumber } from '../format'; +import { + balanceWithCurrency, + formatIncompleteAccountNumber, + accountFormatter, +} from '../format'; import { SearchableDropdown } from '@sb1/ffe-searchable-dropdown-react'; import { getAccountsWithCustomAccounts } from './getAccountsWithCustomAccounts'; import { searchMatcherIgnoringAccountNumberFormatting } from '../searchMatcherIgnoringAccountNumberFormatting'; @@ -126,6 +130,7 @@ export const AccountSelector = ({ const dropdownListAccounts = accounts.map(it => ({ ...it, + accountNumber: accountFormatter(it.accountNumber), balance: OptionBody ? it.balance : balanceWithCurrency(it.balance, locale, it.currencyCode),