jsdf / react-native-refreshable-listview

Deprecated. A pull-to-refresh ListView which shows a loading spinner while your data reloads
1.38k stars 168 forks source link

Spinner Doesn't Show Up #12

Closed soheil-zz closed 8 years ago

soheil-zz commented 9 years ago

With the trunk version of React Native, the spinner no longer shows up on pull down.

jsdf commented 9 years ago

The trunk version? Do you mean 0.4.2? If so, I'm not able to reproduce the issue.

soheil-zz commented 9 years ago

The version when you do a Github pull.

On Sun, May 10, 2015 at 5:57 AM, James Friend notifications@github.com wrote:

The trunk version? Do you mean 0.4.2? If so, I'm not able to reproduce the issue.

— Reply to this email directly or view it on GitHub https://github.com/jsdf/react-native-refreshable-listview/issues/12#issuecomment-100638120 .

jsdf commented 9 years ago

Can you give me the commit SHA of the version of react-native which is presenting the issue? Or better even better, a minimal demo of the issue? As I have been unable to reproduce it.

thomasrose commented 9 years ago

I could not get the spinner to appear when passing a renderHeader method, it works fine when using renderSectionHeader

jsdf commented 9 years ago

Oh. I'm guessing you guys aren't rendering the refreshing indicator which is passed as the first arg to renderHeader. If this API is tripping people up then I guess I should change it. Here's the correct usage:

React.createClass({
  renderHeader(refreshingIndicator) {
    return (
      <View>
        <Text>My custom header</Text>
        {/*  you MUST render the refreshingIndicator (which is passed in as the first argument) */}
        {refreshingIndicator}
      </View>
    )
  },
  render() {
    return (
      <RefreshableListView renderHeader={this.renderHeader} />
    )
  }
})
jsdf commented 9 years ago

Published a new version where renderHeader becomes renderHeaderWrapper