Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/OptionsSelector/BaseOptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import _ from 'underscore';
import lodashGet from 'lodash/get';
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {View, findNodeHandle} from 'react-native';
import {View} from 'react-native';
import Button from '../Button';
import FixedFooter from '../FixedFooter';
import OptionsList from '../OptionsList';
Expand Down Expand Up @@ -203,7 +203,7 @@ class BaseOptionsSelector extends Component {
if (this.props.shouldFocusOnSelectRow) {
// Input is permanently focused on native platforms, so we always highlight the text inside of it
this.textInput.setNativeProps({selection: {start: 0, end: this.props.value.length}});
if (this.relatedTarget && ref === findNodeHandle(this.relatedTarget)) {
if (this.relatedTarget && ref === this.relatedTarget) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it seems like the ref and relatedTarget are referring to the same instance of the internal object and thus check is passing. Cool!

this.textInput.focus();
}
this.relatedTarget = null;
Expand Down