@@ -21,7 +21,7 @@ export default class SortableList extends Component {
2121 sortingEnabled : PropTypes . bool ,
2222 scrollEnabled : PropTypes . bool ,
2323 horizontal : PropTypes . bool ,
24- refreshControl : PropTypes . object ,
24+ refreshControl : PropTypes . element ,
2525
2626 renderRow : PropTypes . func . isRequired ,
2727
@@ -149,21 +149,18 @@ export default class SortableList extends Component {
149149 const { contentContainerStyle, horizontal, style : containerStyle } = this . props ;
150150 const { contentHeight, contentWidth, scrollEnabled} = this . state ;
151151 const innerContainerStyle = [ styles . container ] ;
152- let refreshControl = this . props . refreshControl ;
152+ let { refreshControl} = this . props ;
153153
154154 if ( horizontal ) {
155155 innerContainerStyle . push ( { width : contentWidth } ) ;
156156 } else {
157157 innerContainerStyle . push ( { height : contentHeight } ) ;
158158 }
159159
160- if ( refreshControl ) {
161- refreshControl = (
162- < RefreshControl
163- { ...this . props . refreshControl . props }
164- enabled = { scrollEnabled }
165- />
166- )
160+ if ( refreshControl && refreshControl . type === RefreshControl ) {
161+ refreshControl = React . cloneElement ( this . props . refreshControl , {
162+ enabled : scrollEnabled , // fix for Android
163+ } ) ;
167164 }
168165
169166 return (
0 commit comments