forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Description
Environment
react-native -v: "github:microsoft/react-native#v0.61.38"node -v: v12.14.1npm -v: 6.13.4yarn --version: 1.17.0-20190429.1820xcodebuild -version:
Xcode 11.4.1
Build version 11E503a
Issue
FlatList doesn't pass isSelected to renderItem.
Steps to Reproduce
- Use
FlatListcomponent with arenderItemsuch asrenderItem={({item, isSelected}) => <Text>{isSelected}</Text>. - Set props
acceptsKeyboardFocus={true} enableSelectionOnKeyPress={true}. - Run app, focus on FlatList and use keyboard up/down arrows to move selection.
Expected Behavior
isSelected is true for the selected item
Actual Behavior
isSelected is undefined.
Reproducible Demo
Don't have time right now, maybe later.
Additional context
This works correctly in SectionList.