forked from woowalker/react-native-ptr-control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
35 lines (28 loc) · 1.02 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* Created by woowalker on 2018/1/23.
*/
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import PTRScrollList from './lib/PTRScrollList'
export default class PTRControl extends Component {
static headerRefreshDone = () => PTRScrollList.headerRefreshDone()
static footerInfiniteDone = () => PTRScrollList.footerInfiniteDone()
static propTypes = {
scrollComponent: PropTypes.oneOf(['ScrollView', 'ListView', 'FlatList', 'VirtualizedList']).isRequired,
getRef: PropTypes.func,
enableHeaderRefresh: PropTypes.bool,
setHeaderHeight: PropTypes.number,
onTopReachedThreshold: PropTypes.number,
renderHeaderRefresh: PropTypes.func,
onHeaderRefreshing: PropTypes.func,
pullFriction: PropTypes.number,
enableFooterInfinite: PropTypes.bool,
setFooterHeight: PropTypes.number,
onEndReachedThreshold: PropTypes.number,
renderFooterInfinite: PropTypes.func,
onFooterInfiniting: PropTypes.func,
}
render() {
return <PTRScrollList {...this.props}/>
}
}