File tree Expand file tree Collapse file tree 3 files changed +35
-12
lines changed
test/RefreshableListViewTest Expand file tree Collapse file tree 3 files changed +35
-12
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,16 @@ var MyRefreshingIndicator = React.createClass({
222
222
223
223
### changelog
224
224
225
+ - ** 2.0.0-beta3**
226
+ - fixed proptype warnings from internal component
227
+ - adjusted default styling of refreshing indicator
228
+
229
+ - ** 2.0.0-beta2**
230
+ - pulling down now reveals refreshing indicator behind current view, rather
231
+ than the refreshing indicator moving down from the top of the screen
232
+ - ` renderHeaderWrapper ` is no longer used
233
+ - fixed infinite refreshing when pulled down
234
+
225
235
- ** 1.2.0**
226
236
- deprecated ` renderHeader ` in favour of ` renderHeaderWrapper ` as some
227
237
developers seemed to be confused by the fact that a ` renderHeader ` handler
Original file line number Diff line number Diff line change @@ -75,8 +75,10 @@ var RefreshingIndicator = React.createClass({
75
75
return (
76
76
< View style = { [ styles . wrapper ] } >
77
77
< View style = { [ styles . container , styles . loading , styles . content ] } >
78
- { this . renderDescription ( styles ) }
79
- { this . renderActivityIndicator ( styles ) }
78
+ < View style = { [ styles . stack ] } >
79
+ { this . renderDescription ( styles ) }
80
+ { this . renderActivityIndicator ( styles ) }
81
+ </ View >
80
82
</ View >
81
83
</ View >
82
84
)
@@ -87,16 +89,21 @@ var stylesheet = StyleSheet.create({
87
89
container : {
88
90
flex : 1 ,
89
91
justifyContent : 'center' ,
90
- alignItems : 'center ' ,
92
+ alignItems : 'flex-start ' ,
91
93
flexDirection : 'row' ,
92
94
} ,
95
+ stack : {
96
+ flex : 1 ,
97
+ justifyContent : 'center' ,
98
+ alignItems : 'center' ,
99
+ flexDirection : 'column' ,
100
+ } ,
93
101
wrapper : {
94
102
height : 60 ,
95
- marginTop : 10 ,
96
103
} ,
97
104
content : {
98
105
marginTop : 10 ,
99
- height : 60 ,
106
+ height : 40 ,
100
107
} ,
101
108
} )
102
109
Original file line number Diff line number Diff line change 5
5
Text,
6
6
View,
7
7
ListView,
8
+ StatusBarIOS,
8
9
} = React ;
9
10
10
11
var RefreshableListView = require ( 'react-native-refreshable-listview' )
@@ -22,6 +23,9 @@ var RefreshableListViewTest = React.createClass({
22
23
var rows = makeSequence ( 100 ) . map ( ( n ) => ( { text : 'not refreshed ' + n } ) )
23
24
return { dataSource : ds . cloneWithRows ( rows ) }
24
25
} ,
26
+ componentDidMount ( ) {
27
+ StatusBarIOS . setStyle ( 0 )
28
+ } ,
25
29
reloadItems ( ) {
26
30
return delay ( 1000 ) . then ( ( ) => {
27
31
var rows = makeSequence ( 100 ) . map ( ( n ) => ( { text : 'refreshed ' + n } ) )
@@ -39,13 +43,15 @@ var RefreshableListViewTest = React.createClass({
39
43
} ,
40
44
render ( ) {
41
45
return (
42
- < RefreshableListView
43
- dataSource = { this . state . dataSource }
44
- renderRow = { this . renderItem }
45
- loadData = { this . reloadItems }
46
- refreshDescription = "Refreshing items"
47
- refreshPrompt = "Pull down to refresh"
48
- />
46
+ < View style = { { marginTop : 20 } } >
47
+ < RefreshableListView
48
+ dataSource = { this . state . dataSource }
49
+ renderRow = { this . renderItem }
50
+ loadData = { this . reloadItems }
51
+ refreshDescription = "Refreshing items"
52
+ refreshPrompt = "Pull down to refresh"
53
+ />
54
+ </ View >
49
55
)
50
56
} ,
51
57
} ) ;
You can’t perform that action at this time.
0 commit comments