File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed
Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ import {
1313 StyleSheet ,
1414 Text ,
1515 View ,
16- ScrollView
16+ ScrollView ,
17+ Button
1718} from 'react-native' ;
1819import HuaWeiRefreshControl from './HuaWeiRefreshControl'
1920const instructions = Platform . select ( {
@@ -49,6 +50,9 @@ export default class App extends Component<Props> {
4950 < Text style = { styles . instructions } >
5051 { instructions }
5152 </ Text >
53+ < Button title = 'beginRefresh' onPress = { ( ) => {
54+ this . _hw . beginRefresh ( )
55+ } } />
5256 </ View >
5357 </ ScrollView >
5458 ) ;
Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ export default class HuaWeiRefreshControl extends Component {
5151 finishRefresh = ( ) => {
5252 this . _mjrefresh && this . _mjrefresh . finishRefresh ( ) ;
5353 }
54+ beginRefresh = ( ) => {
55+ this . _mjrefresh && this . _mjrefresh . beginRefresh ( ) ;
56+ }
5457 render ( ) {
5558 return (
5659 < MJRefresh
Original file line number Diff line number Diff line change 1010 "react" : " 16.3.1" ,
1111 "react-native" : " 0.55.4" ,
1212 "react-native-indicators" : " ^0.13.0" ,
13- "react-native-mjrefresh" : " ^0.1 .0" ,
13+ "react-native-mjrefresh" : " ^0.2 .0" ,
1414 "react-native-vector-icons" : " ^4.6.0"
1515 },
1616 "devDependencies" : {
Original file line number Diff line number Diff line change @@ -4170,9 +4170,9 @@ react-native-indicators@^0.13.0:
41704170 dependencies :
41714171 prop-types "^15.5.10"
41724172
4173- react-native-mjrefresh@^0.1 .0 :
4174- version "0.1 .0"
4175- resolved "https://registry.npmjs.org/react-native-mjrefresh/-/react-native-mjrefresh-0.1 .0.tgz#eb82538aea440fa93bf6ff2d2bf2369a34dfc779 "
4173+ react-native-mjrefresh@^0.2 .0 :
4174+ version "0.2 .0"
4175+ resolved "https://registry.npmjs.org/react-native-mjrefresh/-/react-native-mjrefresh-0.2 .0.tgz#4912c6f8a9d5dc68ec391ec9a8c1480f741a1c25 "
41764176
41774177react-native-vector-icons@^4.6.0 :
41784178 version "4.6.0"
You can’t perform that action at this time.
0 commit comments