Skip to content

Commit

Permalink
Merge pull request #72 from tttstudios/hotfix/autoFocusOnLoad
Browse files Browse the repository at this point in the history
Fix Bug always hightlight first slot even autoFocusOnLoad=false
  • Loading branch information
BeckyWu220 authored May 7, 2020
2 parents 29494b9 + a0a7ca6 commit b259c6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class OTPInputView extends Component<InputProps, OTPInputViewStat
const { code } = props
this.state = {
digits: codeToArray(code),
selectedIndex: 0,
selectedIndex: props.autoFocusOnLoad ? 0 : -1,
}
}

Expand Down

0 comments on commit b259c6f

Please sign in to comment.