Fix NumberInput when displayValue is NaN
This commit is contained in:
		@ -31,8 +31,10 @@ class NumberTextInput extends React.Component {
 | 
			
		||||
    const { value } = this.state
 | 
			
		||||
    const displayValue = this.props.formatNumber(value)
 | 
			
		||||
 | 
			
		||||
    const inputValue = isNaN(displayValue) ? 0 : displayValue
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
      <input {...this.props} type="text" value={displayValue} onChange={this.handleChange}/>
 | 
			
		||||
      <input {...this.props} type="text" value={inputValue} onChange={this.handleChange}/>
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user