From 541485c7feff9fc081c0dcf89600687e8a34ca74 Mon Sep 17 00:00:00 2001 From: Hunkyo Jung Date: Sat, 17 Mar 2018 20:09:00 -0700 Subject: [PATCH] Add inverted prop in SectionListExample Summary: This PR adds an option to pass`inverted` prop to SectionListExample in RNTester. FlatListExample already has this option but it's not available in SectionListExample. Run RNTester app on device or simulator and select SectionListExample. Depending on switching `inverted` option, you can see either inverted list or not. [GENERAL][ENHANCEMENT][RNTeater] - Add inverted prop to SectionListExample Closes https://github.com/facebook/react-native/pull/18370 Differential Revision: D7317168 Pulled By: hramos fbshipit-source-id: c6c212c705e686281f23954775cc3465cce3c8df --- RNTester/js/SectionListExample.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RNTester/js/SectionListExample.js b/RNTester/js/SectionListExample.js index d5d7e685c6c..920be176864 100644 --- a/RNTester/js/SectionListExample.js +++ b/RNTester/js/SectionListExample.js @@ -76,6 +76,7 @@ class SectionListExample extends React.PureComponent<{}, $FlowFixMeState> { filterText: '', logViewable: false, virtualized: true, + inverted: false, }; _scrollPos = new Animated.Value(0); @@ -125,6 +126,7 @@ class SectionListExample extends React.PureComponent<{}, $FlowFixMeState> { {renderSmallSwitchOption(this, 'virtualized')} {renderSmallSwitchOption(this, 'logViewable')} {renderSmallSwitchOption(this, 'debug')} + {renderSmallSwitchOption(this, 'inverted')} @@ -146,6 +148,7 @@ class SectionListExample extends React.PureComponent<{}, $FlowFixMeState> { } debug={this.state.debug} + inverted={this.state.inverted} enableVirtualization={this.state.virtualized} onRefresh={() => Alert.alert('onRefresh: nothing to refresh :P')} onScroll={this._scrollSinkY} @@ -232,6 +235,8 @@ const styles = StyleSheet.create({ }, optionSection: { flexDirection: 'row', + flexWrap: 'wrap', + alignItems: 'center', }, searchRow: { paddingHorizontal: 10,