``` render () { <input type="number" value={this.props.value} /> } ``` for example, when the original value is '.98', we need format it to '0.98'. but it is not take effect。 ```javascript class Test extends React.Component { state = { value: '.98', } changeValue = () => { alert(0.98); this.setState({ value: '0.98', }); } render() { return <div> <input type="number" value={this.state.value} /> <button onClick={this.changeValue}>changeValue</button> </div>; } } ReactDOM.render(<Test />, mountNode); ```
Activity
[-]input type="number"[/-][+]BUG: input type="number"[/+]fix issue react#9712
[react#9712] fix <input type="number" /> value ".98" should not be eq…
rocky-jaiswal commentedon Jun 5, 2017
This is working for me - https://codepen.io/anon/pen/LLEzwN?editors=1010
pingan1927 commentedon Jun 9, 2017
your example is not same with mine. the key is .98 can't be formated to 0.98. Because as number they are equal.
[#9712] fix <input type="number" /> value '.98' should not be equal t…
[react#9712] fix <input type="number" /> value '.98' should not be eq…
[#9712] fix <input type="number" /> value '.98' should not be equal t…
nhunzaker commentedon Jun 13, 2017
@aweary Just housekeeping. Do we close out issues before a release with the fix has shipped or wait?
aweary commentedon Jun 13, 2017
@nhunzaker typically I close the issue once the has been merged into master 👍
nhunzaker commentedon Jun 13, 2017
Awesome, thanks! @pingan1927 This should land in the next minor release of React:
15.6.0[react#9712] fix <input type="number" /> value '.98' should not be eq…
[react#9712] fix <input type="number" /> value '.98' should not be eq…