Skip to content

Commit 998db01

Browse files
blenderskoolapollonian
authored andcommitted
Improvements in event handlers
1 parent 3fee224 commit 998db01

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib/index.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ class OtpInput extends Component<Props, State> {
196196

197197
handleOnChange = (e: Object) => {
198198
this.changeCodeAtFocus(e.target.value);
199-
this.focusNextInput();
200199
};
201200

202201
// Handle cases of backspace, delete, left arrow, right arrow, space
@@ -225,8 +224,7 @@ class OtpInput extends Component<Props, State> {
225224

226225
// The content may not have changed, but some input took place hence change the focus
227226
handleInput = (e: Object) => {
228-
this.handleOnChange(e);
229-
this.checkLength(e);
227+
this.focusNextInput();
230228
}
231229

232230
checkLength = (e: Object) => {

0 commit comments

Comments
 (0)