2
I want to load a value defined in state
of the application.
Using a lib to format the input and put Real format coin mask (react-intl-currency-input
).
Only it does not load the value in the input when we apply the componentDidMount
.
Look at:
this.state = {
salario: '1800.00'
}
<IntlCurrencyInput
currency="BRL"
config={currencyConfig}
onChange={this.handleChangeSalarioFormato}
id="salario"
value={this.props.salario}
placeholder="Salário"
disabled={this.state.disabled}
className="form-control"
/>