diff --git a/src/components/OptionRow.js b/src/components/OptionRow.js index 755c94d86f25..c31ed7af1e90 100644 --- a/src/components/OptionRow.js +++ b/src/components/OptionRow.js @@ -165,7 +165,7 @@ function OptionRow(props) { {(hovered) => ( (pressableRef.current = el)} onPress={(e) => { if (!props.onSelectRow) { diff --git a/src/components/OptionsSelector/BaseOptionsSelector.js b/src/components/OptionsSelector/BaseOptionsSelector.js index a9a76d3ea0e6..792073b72613 100755 --- a/src/components/OptionsSelector/BaseOptionsSelector.js +++ b/src/components/OptionsSelector/BaseOptionsSelector.js @@ -303,7 +303,7 @@ class BaseOptionsSelector extends Component { } selectFocusedOption(e) { - const focusedItemKey = lodashGet(e, ['target', 'attributes', 'data-testid', 'value']); + const focusedItemKey = lodashGet(e, ['target', 'attributes', 'id', 'value']); const focusedOption = focusedItemKey ? _.find(this.state.allOptions, (option) => option.keyForList === focusedItemKey) : this.state.allOptions[this.state.focusedIndex]; if (!focusedOption || !this.props.isFocused) { diff --git a/src/components/SelectionList/BaseListItem.js b/src/components/SelectionList/BaseListItem.js index ac679f32d103..443b930d5e7a 100644 --- a/src/components/SelectionList/BaseListItem.js +++ b/src/components/SelectionList/BaseListItem.js @@ -49,7 +49,7 @@ function BaseListItem({ hoverStyle={styles.hoveredComponentBG} dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}} onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined} - testID={keyForList} + nativeID={keyForList} > { - const focusedItemKey = lodashGet(e, ['target', 'attributes', 'data-testid', 'value']); + const focusedItemKey = lodashGet(e, ['target', 'attributes', 'id', 'value']); const focusedOption = focusedItemKey ? _.find(flattenedSections.allOptions, (option) => option.keyForList === focusedItemKey) : flattenedSections.allOptions[focusedIndex]; if (!focusedOption || focusedOption.isDisabled) {