Skip to content

Commit

Permalink
fix: autofocus prop case
Browse files Browse the repository at this point in the history
Closes: #54
  • Loading branch information
marcocesarato committed Apr 10, 2021
1 parent 8b2f779 commit 891dc68
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion PROPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| `activeOpacity` | Opacity on pressed button | Number | `0.85` | |
| `append` | Custom element before right button | Component | | |
| `arrows` | Labels on button will be arrows (< and >) instead of plus and minus | Boolean | `false` | |
| `autofocus` | If `true`, focuses the input on `componentDidMount`. | | `false` | |
| `autoFocus` | If `true`, focuses the input on `componentDidMount`. | | `false` | |
| `background` | Background color of number button | String | `transparent` | |
| `buttonFontFamily` | Custom fontFamily of buttons of the Spinner | String | `System Default` | |
| `buttonFontSize` | Custom fontSize of buttons of the Spinner | Number | `14` | |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Check the "[Props List](PROPS.md)" file to have the complete list of component p
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------------- | ------- | --------------------------------- |
| `accelerationDelay` | Delay time before start the `onLongPress` event and increase or decrease and continually | Number | `750 ` | |
| `append` | Custom element before right button | Component | | |
| `autofocus` | If `true`, focuses the input on `componentDidMount`. | | `false` | |
| `autoFocus` | If `true`, focuses the input on `componentDidMount`. | | `false` | |
| `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` | |
| `disabled` | Disable the Spinner or not | Boolean | `false` | |
| `editable` | Set if input number field is editable or not | Boolean | `true` | |
Expand Down
6 changes: 3 additions & 3 deletions src/InputSpinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ class InputSpinner extends Component {
selectTextOnFocus={this.props.selectTextOnFocus}
returnKeyType={this.props.returnKeyType}
returnKeyLabel={this.props.returnKeyLabel}
autofocus={this.props.autofocus}
autoFocus={this.props.autoFocus}
autoCapitalize={this._getAutoCapitalize()} // Bug fix for Samsung Keyboard
editable={this.isEditable()}
maxLength={this.props.maxLength}
Expand Down Expand Up @@ -1375,7 +1375,7 @@ InputSpinner.propTypes = {
maxLength: PropTypes.number,
disabled: PropTypes.bool,
editable: PropTypes.bool,
autofocus: PropTypes.bool,
autoFocus: PropTypes.bool,
selectTextOnFocus: PropTypes.bool,
placeholder: PropTypes.string,
placeholderTextColor: PropTypes.string,
Expand Down Expand Up @@ -1483,7 +1483,7 @@ InputSpinner.defaultProps = {
maxLength: null,
disabled: false,
editable: true,
autofocus: false,
autoFocus: false,
selectTextOnFocus: null,
selectionColor: null,
returnKeyLabel: null,
Expand Down
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface ReactNativeInputSpinnerProps {
maxLength?: number;
disabled?: boolean;
editable?: boolean;
autofocus?: boolean;
autoFocus?: boolean;
selectTextOnFocus?: boolean;
placeholder?: string;
placeholderTextColor?: string;
Expand Down

0 comments on commit 891dc68

Please sign in to comment.