Default float money to real money
value.toLocaleString('pt-br', {minimumFractionDigits: 2})
Postcode
import MaskedInput from 'react-text-mask';
function TextMaskPostcode(props) {
const { inputRef, ...other } = props;
return (
<MaskedInput
{...other}
ref={inputRef}
mask={[/\d/,/\d/,/\d/,/\d/,/\d/,'-',/\d/,/\d/,/\d/,]}
placeholderChar={'_'}
/>
);
}
<TextField
InputProps={{
inputComponent: TextMaskPostcode,
}}
/>