File tree Expand file tree Collapse file tree 2 files changed +5
-19
lines changed
Expand file tree Collapse file tree 2 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,11 @@ import {
77 ViewPropTypes ,
88 findNodeHandle ,
99 UIManager ,
10+ ScrollView as NativeScrollView ,
11+ Platform ,
1012} from 'react-native' ;
1113import PropTypes from 'prop-types'
14+ import MJScrollView from './MJScrollView'
1215
1316const RCTMJRefreshView = requireNativeComponent ( 'RCTMJRefreshView' , MJRefresh ) ;
1417
@@ -69,5 +72,5 @@ MJRefresh.propTypes={
6972 onPulling :PropTypes . func ,
7073 ...ViewPropTypes
7174}
72- export { default as ScrollView } from './MJScrollView'
75+ export const ScrollView = Platform . OS === 'ios' ? MJScrollView : NativeScrollView ;
7376export default MJRefresh ;
Original file line number Diff line number Diff line change @@ -920,24 +920,7 @@ let nativeOnlyProps,
920920 RCTScrollView ,
921921 RCTScrollContentView ;
922922if ( Platform . OS === 'android' ) {
923- nativeOnlyProps = {
924- nativeOnly : {
925- sendMomentumEvents : true ,
926- }
927- } ;
928- AndroidScrollView = requireNativeComponent (
929- 'RCTScrollView' ,
930- ( ScrollView : React . ComponentType < any > ) ,
931- nativeOnlyProps
932- ) ;
933- AndroidHorizontalScrollView = requireNativeComponent (
934- 'AndroidHorizontalScrollView' ,
935- ( ScrollView : React . ComponentType < any > ) ,
936- nativeOnlyProps
937- ) ;
938- AndroidHorizontalScrollContentView = requireNativeComponent (
939- 'AndroidHorizontalScrollContentView'
940- ) ;
923+
941924} else if ( Platform . OS === 'ios' ) {
942925 nativeOnlyProps = {
943926 nativeOnly : {
You can’t perform that action at this time.
0 commit comments