Skip to content

Commit

Permalink
used nativeID for selection list
Browse files Browse the repository at this point in the history
  • Loading branch information
Pujan92 committed Dec 27, 2023
1 parent d7e60e8 commit 3b7fa06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/SelectionList/BaseListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
>
<View
style={[
Expand Down
2 changes: 1 addition & 1 deletion src/components/SelectionList/BaseSelectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function BaseSelectionList({
};

const selectFocusedOption = (e) => {
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) {
Expand Down

0 comments on commit 3b7fa06

Please sign in to comment.