Skip to content

Commit

Permalink
remove timeout on search focus
Browse files Browse the repository at this point in the history
  • Loading branch information
TMisiukiewicz committed Oct 24, 2023
1 parent f7d1900 commit 0e4411c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/components/OptionsSelector/BaseOptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ class BaseOptionsSelector extends Component {
this.subscribeToKeyboardShortcut();

if (this.props.isFocused && this.props.autoFocus && this.textInput) {
this.focusTimeout = setTimeout(() => {
this.textInput.focus();
}, CONST.ANIMATED_TRANSITION);
this.textInput.focus();
}

this.scrollToIndex(this.props.selectedOptions.length ? 0 : this.state.focusedIndex, false);
Expand Down Expand Up @@ -139,10 +137,6 @@ class BaseOptionsSelector extends Component {
}

componentWillUnmount() {
if (this.focusTimeout) {
clearTimeout(this.focusTimeout);
}

this.unSubscribeFromKeyboardShortcut();
}

Expand Down

0 comments on commit 0e4411c

Please sign in to comment.