You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`id`|`string`| - | - | - | Used as prefix of HTML `id` property. Each input field id will have the currency as a suffix (`${idPrefix}.${lang}`), e.g. `foo.en`|
24
27
|`name`|`string`| - | - | - | Used as HTML `name` property for each input field. Each input field name will have the currency as a suffix (`${namePrefix}.${lang}`), e.g. `foo.en`|
25
-
|`value`|`object`| ✅ | - | - | Values to use. Keyed by currency, the values are the actual values, e.g. `{ USD: '12.22', EUR: '41.44' }`|
28
+
|`value`|`object`| ✅ | - | - | Values to use. Keyed by currency, the values are the money values, e.g. `{ USD: {currencyCode: 'USD', amount: '12.22'}, EUR: {currencyCode: 'EUR', amount: '41.44'} }`|
26
29
|`onChange`|`function`| ✅ | - | - | Gets called when any input is changed. Is called with the change event of the changed input. |
27
30
|`selectedCurrency`|`string`| ✅ | - | - | Specifies which currency will be shown in case the `LocalizedMoneyInput` is collapsed. |
28
31
|`onBlur`|`function`| - | - | - | Called when any field is blurred. Is called with the `event` of that field. |
@@ -153,16 +174,21 @@ Here are examples of `centPrecision` and `highPrecision` prices.
153
174
154
175
##### `LocalizedMoneyInput.parseMoneyValues`
155
176
156
-
The `parseMoneyValues` function will turn a [`MoneyValue`](https://docs.commercetools.com/http-api-types#money) into a value the LocalizedMoneyInput component can handle `({ currencyCode: amount })`.
177
+
The `parseMoneyValues` function will turn a [`MoneyValue`](https://docs.commercetools.com/http-api-types#money) into a value the LocalizedMoneyInput component can handle `({ [currencyCode]: {currencyCode, amount} })`.
157
178
158
179
##### `LocalizedMoneyInput.getEmptyCurrencies`
159
180
160
-
The `getEmptyCurrencies` function will return array of crrencies that don't have amount .
181
+
The `getEmptyCurrencies` function will return array of currencies that don't have amount .
0 commit comments