diff --git a/src/SortableList.js b/src/SortableList.js index 030f8a5..cb7b1a0 100644 --- a/src/SortableList.js +++ b/src/SortableList.js @@ -174,15 +174,12 @@ export default class SortableList extends Component { const {contentContainerStyle, horizontal, style} = this.props; const {animated, contentHeight, contentWidth, scrollEnabled} = this.state; const containerStyle = StyleSheet.flatten([style, {opacity: Number(animated)}]) - const innerContainerStyle = [styles.rowsContainer]; + const innerContainerStyle = [ + styles.rowsContainer, + horizontal ? {width: contentWidth} : {height: contentHeight}, + ]; let {refreshControl} = this.props; - if (horizontal) { - innerContainerStyle.push({width: contentWidth}); - } else { - innerContainerStyle.push({height: contentHeight}); - } - if (refreshControl && refreshControl.type === RefreshControl) { refreshControl = React.cloneElement(this.props.refreshControl, { enabled: scrollEnabled, // fix for Android