Avoid unknown prop warning on <input>

This commit is contained in:
Michael Jackson 2016-08-09 09:38:04 -07:00
parent f1a3ecf997
commit 80b068d5dc
1 changed files with 3 additions and 2 deletions

View File

@ -29,10 +29,11 @@ class NumberTextInput extends React.Component {
render = () => {
const { value } = this.state
const displayValue = this.props.formatNumber(value)
const { parseNumber, formatNumber, ...props } = this.props
const displayValue = formatNumber(value)
return (
<input {...this.props} type="text" value={displayValue} onChange={this.handleChange}/>
<input {...props} type="text" value={displayValue} onChange={this.handleChange}/>
)
}
}