AppAndFlow / react-native-masonry-list

MIT License
170 stars 46 forks source link

Pull to refresh not working #25

Open hecmonn opened 6 years ago

hecmonn commented 6 years ago

Pull to refresh feauture not working

_onRefresh=()=> { this.setState({refreshing: true}); const{username}=this.state; this.props.getInspiration({username,offset:0}) .then(r=>{ this.setState({posts.data.posts,refreshing: false}) }); }

<MasonryList onRefresh={this._onRefresh} refreshing={this.state.refreshing} horizontal={false} onEndReached={this._onLoadMore} keyExtractor={this._keyExtractor} numColumns={2} getHeightForItem={() => 1} data={this.state.posts} renderItem={(item)=><Card auser={this.state.username} item={item}/>} />

If i set refreshing=true, the loading indicator shows, however when I pull to call my _onRefresh function, nothing happens.

gangadhartinmen commented 5 years ago

Is pull to refresh working?