Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change value #778

Open
rwb196884 opened this issue Jul 15, 2023 · 1 comment
Open

Cannot change value #778

rwb196884 opened this issue Jul 15, 2023 · 1 comment

Comments

@rwb196884
Copy link

const NumberFormatCustom = (props: NumberFormatProps) => {
  const { inputRef, ...other } = props;

  return (
    <NumberFormat
      {...other}
      readOnly={false}
      disabled={false}
      getInputRef={inputRef}
      thousandSeparator=","
      //decimalScale={props.decimalScale}
      fixedDecimalScale={true}
      placeholder={moneyPlaceholder}
      //isNumericString
      onValueChange={(values: NumberFormatValues) => {
        console.log(`NumberFormat.onValueChange ${JSON.stringify(values)}`);
      }}
    />
  );
};

A form element appears with a formatted value, but the value can't be changed. The onValueChange never fires, nor does the onChange that's hidden in ...other.

Can this be used for editing values or not?

@s-yadav
Copy link
Owner

s-yadav commented Jul 16, 2023

Can you create a sandbox where it's not working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants