Skip to content

Commit 5639225

Browse files
committed
v0.1.6
1 parent 71150c3 commit 5639225

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

index.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ export default class Slide extends React.Component{
5252
}
5353

5454
componentDidMount(){
55-
this.state.autoPlay && this._autoPlay();
55+
//this.state.autoPlay && this._autoPlay();
56+
React.Children.count(this.state.children) && this.state.autoPlay && this._autoPlay();
5657
}
5758

5859
componentWillUnmount(){
@@ -197,7 +198,12 @@ export default class Slide extends React.Component{
197198
render(){
198199
//first come may have no child, such as async get child
199200
if(!React.Children.count(this.state.children)){//this.state.children.length?
200-
return false;
201+
return (
202+
<View style={[styles.container, {
203+
height: this.state.height
204+
}]}>
205+
</View>
206+
);
201207
}
202208
let state = this.state;
203209
//pagination

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-slide",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "react-native-slide",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)