unicef / material-ui-currency-textfield

Currency textfield for React Material UI
https://unicef.github.io/material-ui-currency-textfield/
117 stars 93 forks source link

The AutoNumeric object count on the form is incoherent. #60

Open khenlevy opened 2 years ago

khenlevy commented 2 years ago

We are getting the following on our production environment. It is very weird, when we Empty Cache and Hard reload the issue resolves. Any idea why it is happening for first time visiting users?

image (11)

This is how we using it:

import CurrencyTextField from '@unicef/material-ui-currency-textfield';
import React from 'react';

const Price = ({
  name,
  value,
  setFieldValue,
  minimumValue = '0',
  decimalPlaces = 0,
  decimalCharacter = '.',
  digitGroupSeparator = ',',
}) => {
  return (
    <CurrencyTextField
      id={name}
      value={value}
      label={'label'}
      variant={'outlined'}
      outputFormat={'string'}
      minimumValue={minimumValue}
      style={{
        minWidth: '240px',
      }}
      textAlign="left"
      helperText={'asdf'}
      decimalPlaces={decimalPlaces}
      currencySymbol={'$'}
      decimalCharacter={decimalCharacter}
      digitGroupSeparator={digitGroupSeparator}
      onChange={(event, value) => setFieldValue(name, value)}
    />
  );
};

export default Price;