Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c3a1170

Browse files
committed
Tiny refactoring
1 parent 54ed60f commit c3a1170

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

‎src/SortableList.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,12 @@ export default class SortableList extends Component {
174174
const {contentContainerStyle, horizontal, style} = this.props;
175175
const {animated, contentHeight, contentWidth, scrollEnabled} = this.state;
176176
const containerStyle = StyleSheet.flatten([style, {opacity: Number(animated)}])
177-
const innerContainerStyle = [styles.rowsContainer];
177+
const innerContainerStyle = [
178+
styles.rowsContainer,
179+
horizontal ? {width: contentWidth} : {height: contentHeight},
180+
];
178181
let {refreshControl} = this.props;
179182

180-
if (horizontal) {
181-
innerContainerStyle.push({width: contentWidth});
182-
} else {
183-
innerContainerStyle.push({height: contentHeight});
184-
}
185-
186183
if (refreshControl && refreshControl.type === RefreshControl) {
187184
refreshControl = React.cloneElement(this.props.refreshControl, {
188185
enabled: scrollEnabled, // fix for Android

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /