forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move accessibilityCollectionItem logic to VirtList
further info at fabOnReact/react-native-notes#6 (comment) - Adds support for SectionList, VirtualizedList - Sharing common logic between components The accessibilityCollectionItem is calculated in the VirtualizedList and passed as a 4th parameter to renderItem function https://github.com/fabriziobertoglio1987/react-native-notes/blob/f49caa490eb2378466bfa3eeb672aa6eab5b65b7/Libraries/Lists/VirtualizedList.js#L1995-L2023 ```javascript renderItem({ item, index, separators: this._separators, accessibilityCollectionItem, }); ``` adding accessibilityCollectionItem would make the FlatList cell or VirtualizedList row announce row 1 column 1, row 2 column 2 ... https://reactnative.dev/docs/next/flatlist#required-renderitem The main difference between FlatList and VirtualizedList is that FlatList can have numColumns > 1 and the computation of accessibilityCollectionItem is changed in the FlatList based on the numColumns value. TODO - Move logic to ScrollView and add support for ScrollView - Add accessibilityCollectionItem prop to View. The user can change this prop and it is part of the public API
- Loading branch information
1 parent
f49caa4
commit 7514735
Showing
2 changed files
with
39 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters