-
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
Item in report list is not highlighted and list cannot be navigated with keyboard #37081
Changes from 16 commits
79f02bc
172c807
f953b79
41f1507
049756b
150c90b
2317ae5
4ad85e6
279cf4a
7eb76d6
6794d02
fc784e6
8154f93
5d440d7
86ec95b
0db97cf
1acf6b2
27576a0
7d67f31
fadf22a
131435c
826fbec
672e271
fba4343
ff625d2
10fcd80
713eee6
90e3f46
83c4c31
e508f98
98edd68
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 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,9 @@ | ||||||||||
import type {SectionListData} from 'react-native'; | ||||||||||
|
||||||||||
/** Returns a list of sections with IndexOffset */ | ||||||||||
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.
Suggested change
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. Done |
||||||||||
export default function getSectionsWithIndexOffset<ItemT, SectionT>(sections: Array<SectionListData<ItemT, SectionT>>) { | ||||||||||
return sections.map((section, index) => { | ||||||||||
const indexOffset = [...sections].splice(0, index).reduce((acc, curr) => acc + (curr.data?.length ?? 0), 0); | ||||||||||
return {...section, indexOffset}; | ||||||||||
}); | ||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,6 +92,7 @@ function EditReportFieldDropdownPage({fieldName, onSubmit, fieldID, fieldValue, | |
textInputLabel={translate('common.search')} | ||
boldStyle | ||
sections={sections} | ||
focusedIndex={0} | ||
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. does this have to be set to 0? 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. This is exactly the screen where the bug was found 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. Can you put that in a comment to make this very clear? 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. Please explain the why in the comment 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. This has already been fixed) |
||
value={searchValue} | ||
onSelectRow={(option: Record<string, string>) => onSubmit({[fieldID]: option.text})} | ||
onChangeText={setSearchValue} | ||
|
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.
Why are we making this optional instead of removing it, or explicitly passing it everywhere?
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.
Done