Fix bug preventing jest from ever finishing on build server
This commit is contained in:
parent
ed62f02b53
commit
1bbb83c280
1 changed files with 3 additions and 3 deletions
|
@ -54,7 +54,7 @@ export type IMoneyTextFieldProps = Omit<TextFieldProps,'value'> &
|
|||
*/
|
||||
function MoneyTextField({ children, form, field, currencyDisplay, useGrouping, allowEmpty, selectAllOnFocus, ...props }:IMoneyTextFieldProps) : JSX.Element {
|
||||
const {name:fieldName, value} = field;
|
||||
|
||||
const {setFieldValue} = form;
|
||||
const inputRef = useRef<HTMLInputElement>();
|
||||
|
||||
const {currency} = value;
|
||||
|
@ -67,9 +67,9 @@ function MoneyTextField({ children, form, field, currencyDisplay, useGrouping, a
|
|||
|
||||
useEffect(() => {
|
||||
|
||||
form.setFieldValue(fieldName, Money.fromCents(valueInCents, currency));
|
||||
setFieldValue(fieldName, Money.fromCents(valueInCents, currency));
|
||||
|
||||
}, [fieldName, valueInCents, currency, form]);
|
||||
}, [fieldName, valueInCents, currency, setFieldValue]);
|
||||
|
||||
|
||||
return <MuiTextField {...fieldToTextField({form, field, ...props})} value={maskedValue}
|
||||
|
|
Loading…
Reference in a new issue