StaticFlatList
StaticFlatList extends the React Native FlatList component [focused on accessibility].
Usage
import { StaticFlatList } from '@react-native-ama/lists';
<StaticFlatList
data={items}
renderItem={renderItem}
keyExtractor={item => item.id}
/>
Accessibility Improvements
- On
Android
allows TalkBack to announce in list/out list or in grid/out of grid
TalkBack
With a native app, TalkBack, to announce when the user focuses or leaves a list for the first time. This info is additionally provided as in list (or in grid), and out of list (or out of the grid). This behaviour is missing in ReactNative as the FlatList uses a ScrollView instead of the native RecyclerView one.
To provide this accessibility feature, AMA wraps the list in the custom native component: ListWrapper.
Additional props
rowsCount
The number of rows of the list/grid. If empty, the length of the data is used to calculate it and divided by numColumns
.
When passing rowsCount
, it is used as it is and is assumed that the number of columns has been taken into account.
numColumns
The number of columns of the list/grid.