Skip to content

Commit 8ab8f8a

Browse files
committed
2 parents d762556 + 0efc851 commit 8ab8f8a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ the browsers. Additionally this component offers more flexible options and can
88
be used for any values (differently formatted representations of the internal
99
numeric value).
1010

11-
[Live demo](http://vlad-ignatov.github.io/react-numeric-input/)
11+
![Demo](https://i.imgur.com/uUnxO73.gif)
12+
### [**Live demo**](http://vlad-ignatov.github.io/react-numeric-input/)
1213

1314
## Installation
1415
```sh

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-numeric-input",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "Number input component that can replace the native number input which is not yet very well supported and where it is, it does not have the same appearance across the browsers. Additionally this component offers more flexible options and can be used for any values (differently formatted representations of the internal numeric value).",
55
"main": "index.js",
66
"scripts": {

src/NumericInput.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,11 +1112,13 @@ class NumericInput extends Component
11121112
Object.assign(attrs.input.style, css['input:disabled'])
11131113
}
11141114
}
1115+
1116+
const InputTag = props.componentClass || 'input';
11151117

11161118
if (mobile) {
11171119
return (
11181120
<span {...attrs.wrap}>
1119-
<input {...attrs.input}/>
1121+
<InputTag {...attrs.input}/>
11201122
<b {...attrs.btnUp}>
11211123
<i style={ style === false ? null : css.minus }/>
11221124
<i style={ style === false ? null : css.plus }/>
@@ -1130,7 +1132,7 @@ class NumericInput extends Component
11301132

11311133
return (
11321134
<span {...attrs.wrap}>
1133-
<input {...attrs.input}/>
1135+
<InputTag {...attrs.input}/>
11341136
<b {...attrs.btnUp}>
11351137
<i style={ style === false ? null : css.arrowUp }/>
11361138
</b>

0 commit comments

Comments
 (0)