From 3ccfb58701d61449b74e387d2b9eced25bdefe31 Mon Sep 17 00:00:00 2001 From: Fred Liu Date: Thu, 19 May 2016 21:40:03 -0700 Subject: [PATCH] Simplify SwipeableRow styling Summary: - Removed some styling from `SwipeableRow` that wasn't doing much and made slide out view full height Reviewed By: fkgozali Differential Revision: D3322849 fbshipit-source-id: 811eee9032c142c61d303ae7e966d8ef7903adaf --- .../Experimental/SwipeableRow/SwipeableRow.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Libraries/Experimental/SwipeableRow/SwipeableRow.js b/Libraries/Experimental/SwipeableRow/SwipeableRow.js index dfac8e99b..e22c6878e 100644 --- a/Libraries/Experimental/SwipeableRow/SwipeableRow.js +++ b/Libraries/Experimental/SwipeableRow/SwipeableRow.js @@ -74,6 +74,7 @@ const SwipeableRow = React.createClass({ * component A to be transparent until component B is loaded. */ isSwipeableViewRendered: false, + rowHeight: (null: ?number), }; }, @@ -117,7 +118,10 @@ const SwipeableRow = React.createClass({ let slideOutView; if (this.state.isSwipeableViewRendered) { slideOutView = ( - + {this.props.slideoutView} ); @@ -139,8 +143,7 @@ const SwipeableRow = React.createClass({ return ( + {...this._panResponder.panHandlers}> {slideOutView} {swipeableView} @@ -151,6 +154,7 @@ const SwipeableRow = React.createClass({ if (!this.state.isSwipeableViewRendered) { this.setState({ isSwipeableViewRendered: true, + rowHeight: event.nativeEvent.layout.height, }); } }, @@ -225,13 +229,8 @@ const SwipeableRow = React.createClass({ }); const styles = StyleSheet.create({ - container: { - flex: 1, - flexDirection: 'row', - }, slideOutContainer: { bottom: 0, - flex: 1, left: 0, position: 'absolute', right: 0,