fix: item form money input with new props.

This commit is contained in:
Ahmed Bouhuolia
2020-11-29 00:30:09 +02:00
parent dcc9370d87
commit 9a58b41e96
2 changed files with 4 additions and 4 deletions

View File

@@ -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';

View File

@@ -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);
}}
/>
</ControlGroup>
@@ -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);
}}
/>