Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ListView] Some props not having any effect #1514

Closed
marcshilling opened this issue Jun 4, 2015 · 1 comment
Closed

[ListView] Some props not having any effect #1514

marcshilling opened this issue Jun 4, 2015 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@marcshilling
Copy link

Here's my render method, a simple ListView (contained within a NavigatorIOS and TabBarIOS):

  render() {
    return (
      <ListView
        ref='listView'
        contentInset={{top: 20, bottom: 49}}
        contentOffset={{y: 0}}
        scrollIndicatorInsets={{top: 64, bottom: 49}}
        style={styles.listView}
        dataSource={this.state.dataSource}
        renderHeader={::this.renderHeader}
        renderRow={::this.renderRow}
        automaticallyAdjustContentInsets={false}
        showsVerticalScrollIndicator={true}
        onScrollEndDrag={::this.onScrollEndDrag}
        onScroll={(e) => console.log(e.nativeEvent.contentOffset.y)}
      />
    );
  }

The particular props I'm having issues with are contentOffset and scrollIndicatorInsets. Whatever values I pass these props, I see no changes upon reloading.

My other issue - for some reason the onScrollEndDrag prop function is not called on the iPhone 4S simulator. It is called on all the other sims I've tried...very odd.

Side note: I'm set up using webpack for hot reloads...and I can change the prop values on the fly and watch them work after live reloads. So I can load the view, notice the scroll indicators have not been adjusted...change "top" to 1000 (and watch it become wildly incorrect), then change it back to 64 and watch it become the way it should have been when it first loaded. Of course, if you don't have webpack set up you won't be able to reproduce this - but you should be able to reproduce the fact that the props are seemingly ignored.

@brentvatne brentvatne changed the title Some ListView props not having any effect [ListView] Some props not having any effect Jun 4, 2015
@marcshilling
Copy link
Author

Closing this - weird behavior from my react fork

@facebook facebook locked as resolved and limited conversation to collaborators Jun 5, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants