-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[material-ui][docs][TextField] Update react-number-format integration demo #19922
Comments
Could you include an example that uses |
<NumberFormat
customInput={TextField}
thousandSeparator={true}
prefix={'£'}
id='minValue'
label='Minimum Value'
onChange={handleChange}
value={minValue}
className={classes.formControl}
inputProps={{
name: 'minValue'
}}
/> https://github.com/s-yadav/react-number-format#custom-inputs |
I wonder about the best option we have here. In which order should we compose the two components? NumberFormat > TextField as in the above example requires less code. I wonder about the implication it can have with the MaskedInput example. I also wonder about the forms libraries integrations. |
The codebase I'm working on was having issues with using the recommended way in the MUI docs. Ended up using the above suggested method with Unfortunately we were not able to reproduce the issue in a codesandbox with our setup, so hard saying what it was about the MUI-suggested way but something was definitely messing it up from within the TextField component. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @rswlkr How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
react-number-format has a customInput prop that allows passing materialui components. A custom implementation of the input component is therefore not required and the docs/examples should be updated to reflect this.
The text was updated successfully, but these errors were encountered: