Skip to content

Conversation

@tido64
Copy link
Member

@tido64 tido64 commented Jun 19, 2020

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

FlatList doesn't pass isSelected to renderItem.

Resolves #462

Changelog

[macOS] [Fixed] - Fix isSelected not being passed to FlatList.renderItem

Test Plan

  1. Patch RNTester/js/examples/FlatList/FlatListExample.js to output isSelected (see patch below)
  2. Go to RNTester > FlatList
  3. Observe that undefined is no longer output, but proper boolean values
diff --git a/RNTester/js/examples/FlatList/FlatListExample.js b/RNTester/js/examples/FlatList/FlatListExample.js
index 733285229..4936ee212 100644
--- a/RNTester/js/examples/FlatList/FlatListExample.js
+++ b/RNTester/js/examples/FlatList/FlatListExample.js
@@ -191,6 +191,7 @@ class FlatListExample extends React.PureComponent<Props, State> {
       renderItem: undefined,
       [flatListPropKey]: ({item, isSelected, separators}) => {
         // TODO(macOS ISS#2323203)
+        console.log(JSON.stringify(item), isSelected);
         return (
           <ItemComponent
             item={item}
Microsoft Reviewers: Open in CodeFlow

@tido64 tido64 requested a review from tom-un as a code owner June 19, 2020 11:43
Copy link

@elicwhite elicwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tom-un tom-un merged commit 58949cb into microsoft:master Jun 19, 2020
@tido64 tido64 deleted the fix-missing-isselected branch June 19, 2020 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FlatList doesn't pass isSelected to renderItem

3 participants