Skip to content

Commit

Permalink
input number default props type number
Browse files Browse the repository at this point in the history
If <input /> elem not blur, letter is allow to input, and user jump press enter key will submit the illegality value.
And add the type="number" attr will avoid this problem.
  • Loading branch information
shenqihui committed Dec 13, 2019
1 parent fe907ba commit 1fdfc8f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export default class InputNumber extends React.Component {
parser: defaultParser,
required: false,
autoComplete: 'off',
type: 'number',
}

constructor(props) {
Expand Down

0 comments on commit 1fdfc8f

Please sign in to comment.