Avoid unknown prop warning on <input>
This commit is contained in:
@ -29,10 +29,11 @@ class NumberTextInput extends React.Component {
|
|||||||
|
|
||||||
render = () => {
|
render = () => {
|
||||||
const { value } = this.state
|
const { value } = this.state
|
||||||
const displayValue = this.props.formatNumber(value)
|
const { parseNumber, formatNumber, ...props } = this.props
|
||||||
|
const displayValue = formatNumber(value)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<input {...this.props} type="text" value={displayValue} onChange={this.handleChange}/>
|
<input {...props} type="text" value={displayValue} onChange={this.handleChange}/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user