11import  React ,  { Component }  from  'react' ; 
22import  PropTypes  from  'prop-types' ; 
3- import  { ScrollView ,  View ,  StyleSheet ,  Platform ,  RefreshControl , ViewPropTypes }  from  'react-native' ; 
3+ import  { ScrollView ,  View ,  StyleSheet ,  Platform ,  RefreshControl }  from  'react-native' ; 
44import  { shallowEqual ,  swapArrayElements }  from  './utils' ; 
55import  Row  from  './Row' ; 
66
@@ -13,13 +13,17 @@ function uniqueRowKey(key) {
1313
1414uniqueRowKey . id  =  0 
1515
16+ // react-native seems to sometimes represent stylesheet entries as numbers, and sometimes as objects. 
17+ // See: https://stackoverflow.com/questions/41483862/how-are-styles-mapped-to-numbers-in-react-native 
18+ const  STYLE_TYPE  =  PropTypes . oneOfType ( [ PropTypes . number ,  PropTypes . object ] ) 
19+ 1620export  default  class  SortableList  extends  Component  { 
1721 static  propTypes  =  { 
1822 data : PropTypes . oneOfType ( [ PropTypes . array ,  PropTypes . object ] ) . isRequired , 
1923 order : PropTypes . arrayOf ( PropTypes . any ) , 
20-  style : ViewPropTypes . style , 
21-  contentContainerStyle : ViewPropTypes . style , 
22-  innerContainerStyle : ViewPropTypes . style , 
24+  style : STYLE_TYPE , 
25+  contentContainerStyle : STYLE_TYPE , 
26+  innerContainerStyle : STYLE_TYPE , 
2327 sortingEnabled : PropTypes . bool , 
2428 scrollEnabled : PropTypes . bool , 
2529 horizontal : PropTypes . bool , 
0 commit comments