{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/15892","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/15892/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/15892/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/15892/events","html_url":"https://github.com/facebook/react-native/issues/15892","id":256812715,"number":15892,"title":"FlatList data changed but refresh indicator not shows automatically","user":{"login":"EthanChouTW","id":11582478,"avatar_url":"https://avatars0.githubusercontent.com/u/11582478?v=4","gravatar_id":"","url":"https://api.github.com/users/EthanChouTW","html_url":"https://github.com/EthanChouTW","followers_url":"https://api.github.com/users/EthanChouTW/followers","following_url":"https://api.github.com/users/EthanChouTW/following{/other_user}","gists_url":"https://api.github.com/users/EthanChouTW/gists{/gist_id}","starred_url":"https://api.github.com/users/EthanChouTW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EthanChouTW/subscriptions","organizations_url":"https://api.github.com/users/EthanChouTW/orgs","repos_url":"https://api.github.com/users/EthanChouTW/repos","events_url":"https://api.github.com/users/EthanChouTW/events{/privacy}","received_events_url":"https://api.github.com/users/EthanChouTW/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-11T19:17:40Z","updated_at":"2017-10-31T21:32:23Z","closed_at":null,"author_association":"NONE","body":"### Is this a bug report?\r\n\r\nwhen my flatList data changed, the layout changed but refresh indicator on top of flatList is not always shows loading automatically, I have to pull it down a little bit then the indicator stick on flatList, or it just shows at a blink when the data really changed, not shows at whole async data changed time as expected.\r\n\r\n\r\n\r\n### Have you read the [Contributing Guidelines](https://facebook.github.io/react-native/docs/contributing.html)?\r\n\r\nyes\r\n\r\n### Environment\r\n\r\n<!--\r\n  Please fill in all the relevant fields by running these commands in terminal.\r\n-->\r\n\r\n1. `react-native -v`: 0.46.0\r\n2. `node -v`: v6.9.1\r\n3. `npm -v`: 3.10.8\r\n4. `yarn --version`: 0.24.5\r\n\r\n- Target Platform: iOS\r\nandroid works fine\r\n\r\n- Development Operating System: macOS\r\n\r\n- Build tools: Xcode\r\n\r\n### Steps to Reproduce\r\n\r\n1. set refreshing state to true then call api, but refresh indicator on flatList not always automatically pull down \r\n2. api back then data changed, it pull down at a blink, set refreshing state to false\r\n\r\n### Expected Behavior\r\nloading indicator should show right after api called.\r\n\r\n### Actual Behavior\r\n\r\nit shows and disappear quickly on data changed.\r\n\r\n```\r\n onRefresh = async () => {\r\n    this.setState({\r\n      isRefreshing: true\r\n    });\r\n    await this.props.searchProducts(this.state.searchString);\r\n    await this.setState({\r\n      data: this.props.products.searchProductsIds.map(\r\n        id => this.props.products.searchProductsById[id]\r\n      )\r\n    });\r\n   \r\n    this.setState({\r\n      isRefreshing: false\r\n    });\r\n   \r\n  };\r\n\r\n  <FlatList\r\n      removeClippedSubviews={false}\r\n      onRefresh={this.onRefresh}\r\n      refreshing={this.state.refreshing}\r\n      extraData={this.extraData}\r\n      data={this.state.data}\r\n      renderItem={this.renderItem}\r\n      keyExtractor={product => product.id}\r\n      contentContainerStyle={styles.listContainer}\r\n      onEndReached={this.handleLoadMore}\r\n      onEndReachedThreshold={5}\r\n    />\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/340913633","html_url":"https://github.com/facebook/react-native/issues/15892#issuecomment-340913633","issue_url":"https://api.github.com/repos/facebook/react-native/issues/15892","id":340913633,"user":{"login":"laynemoseley","id":848192,"avatar_url":"https://avatars2.githubusercontent.com/u/848192?v=4","gravatar_id":"","url":"https://api.github.com/users/laynemoseley","html_url":"https://github.com/laynemoseley","followers_url":"https://api.github.com/users/laynemoseley/followers","following_url":"https://api.github.com/users/laynemoseley/following{/other_user}","gists_url":"https://api.github.com/users/laynemoseley/gists{/gist_id}","starred_url":"https://api.github.com/users/laynemoseley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laynemoseley/subscriptions","organizations_url":"https://api.github.com/users/laynemoseley/orgs","repos_url":"https://api.github.com/users/laynemoseley/repos","events_url":"https://api.github.com/users/laynemoseley/events{/privacy}","received_events_url":"https://api.github.com/users/laynemoseley/received_events","type":"User","site_admin":false},"created_at":"2017-10-31T21:32:23Z","updated_at":"2017-10-31T21:32:23Z","author_association":"NONE","body":"I am also seeing this. Note that I'm also setting the pending value in `state`. Usually when we set it with `props` it works as normal."}}
{"actor":{"display_login":"laynemoseley"}}