diff --git a/client/src/components/CurrencySelectList.js b/client/src/components/CurrencySelectList.js index d45d3e08a..c59c63795 100644 --- a/client/src/components/CurrencySelectList.js +++ b/client/src/components/CurrencySelectList.js @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import { FormattedMessage as T } from 'react-intl'; import { CLASSES } from 'common/classes'; import classNames from 'classnames'; diff --git a/client/src/containers/Items/ItemFormBody.js b/client/src/containers/Items/ItemFormBody.js index c346aac17..6baf82f80 100644 --- a/client/src/containers/Items/ItemFormBody.js +++ b/client/src/containers/Items/ItemFormBody.js @@ -60,8 +60,8 @@ function ItemFormBody({ accountsList, baseCurrency }) { prefix={'$'} inputGroupProps={{ fill: true }} disabled={!form.values.sellable} - onChange={(evt, value) => { - form.setFieldValue('sell_price', value); + onChange={(unformattedValue) => { + form.setFieldValue('sell_price', unformattedValue); }} /> @@ -135,7 +135,7 @@ function ItemFormBody({ accountsList, baseCurrency }) { prefix={'$'} inputGroupProps={{ medium: true }} disabled={!form.values.purchasable} - onChange={(evt, unformattedValue) => { + onChange={(unformattedValue) => { form.setFieldValue('cost_price', unformattedValue); }} />