Skip to content

Commit 891dc68

Browse files
committed
fix: autofocus prop case
Closes: #54
1 parent 8b2f779 commit 891dc68

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

PROPS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| `activeOpacity` | Opacity on pressed button | Number | `0.85` | |
99
| `append` | Custom element before right button | Component | | |
1010
| `arrows` | Labels on button will be arrows (< and >) instead of plus and minus | Boolean | `false` | |
11-
| `autofocus` | If `true`, focuses the input on `componentDidMount`. | | `false` | |
11+
| `autoFocus` | If `true`, focuses the input on `componentDidMount`. | | `false` | |
1212
| `background` | Background color of number button | String | `transparent` | |
1313
| `buttonFontFamily` | Custom fontFamily of buttons of the Spinner | String | `System Default` | |
1414
| `buttonFontSize` | Custom fontSize of buttons of the Spinner | Number | `14` | |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Check the "[Props List](PROPS.md)" file to have the complete list of component p
118118
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------------- | ------- | --------------------------------- |
119119
| `accelerationDelay` | Delay time before start the `onLongPress` event and increase or decrease and continually | Number | `750 ` | |
120120
| `append` | Custom element before right button | Component | | |
121-
| `autofocus` | If `true`, focuses the input on `componentDidMount`. | | `false` | |
121+
| `autoFocus` | If `true`, focuses the input on `componentDidMount`. | | `false` | |
122122
| `continuity` | On min value is reached next decrease value will be the max value, if max is reached next increase value will be the min value | Boolean | `false` | |
123123
| `disabled` | Disable the Spinner or not | Boolean | `false` | |
124124
| `editable` | Set if input number field is editable or not | Boolean | `true` | |

src/InputSpinner.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ class InputSpinner extends Component {
13211321
selectTextOnFocus={this.props.selectTextOnFocus}
13221322
returnKeyType={this.props.returnKeyType}
13231323
returnKeyLabel={this.props.returnKeyLabel}
1324-
autofocus={this.props.autofocus}
1324+
autoFocus={this.props.autoFocus}
13251325
autoCapitalize={this._getAutoCapitalize()} // Bug fix for Samsung Keyboard
13261326
editable={this.isEditable()}
13271327
maxLength={this.props.maxLength}
@@ -1375,7 +1375,7 @@ InputSpinner.propTypes = {
13751375
maxLength: PropTypes.number,
13761376
disabled: PropTypes.bool,
13771377
editable: PropTypes.bool,
1378-
autofocus: PropTypes.bool,
1378+
autoFocus: PropTypes.bool,
13791379
selectTextOnFocus: PropTypes.bool,
13801380
placeholder: PropTypes.string,
13811381
placeholderTextColor: PropTypes.string,
@@ -1483,7 +1483,7 @@ InputSpinner.defaultProps = {
14831483
maxLength: null,
14841484
disabled: false,
14851485
editable: true,
1486-
autofocus: false,
1486+
autoFocus: false,
14871487
selectTextOnFocus: null,
14881488
selectionColor: null,
14891489
returnKeyLabel: null,

src/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface ReactNativeInputSpinnerProps {
3333
maxLength?: number;
3434
disabled?: boolean;
3535
editable?: boolean;
36-
autofocus?: boolean;
36+
autoFocus?: boolean;
3737
selectTextOnFocus?: boolean;
3838
placeholder?: string;
3939
placeholderTextColor?: string;

0 commit comments

Comments
 (0)