-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: focusing on item by tab key does not work #33265
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,8 @@ const propTypes = { | |
/** Whether to wrap large text up to 2 lines */ | ||
isMultilineSupported: PropTypes.bool, | ||
|
||
/** Key used internally by React */ | ||
keyForList: PropTypes.string, | ||
style: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]), | ||
|
||
...withLocalizePropTypes, | ||
|
@@ -99,6 +101,7 @@ const defaultProps = { | |
shouldHaveOptionSeparator: false, | ||
shouldDisableRowInnerPadding: false, | ||
shouldPreventDefaultFocusOnSelectRow: false, | ||
keyForList: undefined, | ||
}; | ||
|
||
function OptionRow(props) { | ||
|
@@ -163,6 +166,7 @@ function OptionRow(props) { | |
<Hoverable> | ||
{(hovered) => ( | ||
<PressableWithFeedback | ||
testID={props.keyForList} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just noticing that we probably shouldn't have used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI we updated this in #33667 |
||
ref={(el) => (pressableRef.current = el)} | ||
onPress={(e) => { | ||
if (!props.onSelectRow) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put this above style and provide a comment explaining it function as we do with other props
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alitoshmatov I just updated