{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/17553","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/17553/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/17553/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/17553/events","html_url":"https://github.com/facebook/react-native/issues/17553","id":287963197,"node_id":"MDU6SXNzdWUyODc5NjMxOTc=","number":17553,"title":"Inverted FlatList displays activity indicator at the bottom","user":{"login":"quadsurf","id":18299175,"node_id":"MDQ6VXNlcjE4Mjk5MTc1","avatar_url":"https://avatars3.githubusercontent.com/u/18299175?v=4","gravatar_id":"","url":"https://api.github.com/users/quadsurf","html_url":"https://github.com/quadsurf","followers_url":"https://api.github.com/users/quadsurf/followers","following_url":"https://api.github.com/users/quadsurf/following{/other_user}","gists_url":"https://api.github.com/users/quadsurf/gists{/gist_id}","starred_url":"https://api.github.com/users/quadsurf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quadsurf/subscriptions","organizations_url":"https://api.github.com/users/quadsurf/orgs","repos_url":"https://api.github.com/users/quadsurf/repos","events_url":"https://api.github.com/users/quadsurf/events{/privacy}","received_events_url":"https://api.github.com/users/quadsurf/received_events","type":"User","site_admin":false},"labels":[{"id":192797868,"node_id":"MDU6TGFiZWwxOTI3OTc4Njg=","url":"https://api.github.com/repos/facebook/react-native/labels/Good%20first%20issue","name":"Good first issue","color":"0052cc","default":false},{"id":267325512,"node_id":"MDU6TGFiZWwyNjczMjU1MTI=","url":"https://api.github.com/repos/facebook/react-native/labels/Help%20Wanted%20:octocat:","name":"Help Wanted :octocat:","color":"0052cc","default":false},{"id":328402671,"node_id":"MDU6TGFiZWwzMjg0MDI2NzE=","url":"https://api.github.com/repos/facebook/react-native/labels/%F0%9F%8C%9FFeature%20Request","name":"🌟Feature Request","color":"d4c5f9","default":false},{"id":860843489,"node_id":"MDU6TGFiZWw4NjA4NDM0ODk=","url":"https://api.github.com/repos/facebook/react-native/labels/%F0%9F%94%B6Lists","name":"🔶Lists","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2018-01-11T23:44:26Z","updated_at":"2018-11-28T06:48:03Z","closed_at":null,"author_association":"NONE","body":"### Is this a bug report?\r\nyes\r\n\r\n### Have you read the [Contributing Guidelines](https://facebook.github.io/react-native/docs/contributing.html)?\r\nyes\r\n\r\n### Environment\r\n  Environment: all newer environments\r\n  Packages: any packages\r\n  Target Platform: any platform\r\n  Version: 0.53.0 and all other versions of RN that support FlatList with the ```inverted``` attribute\r\n\r\n### Steps to Reproduce\r\n1. ```return <FlatList {...props} inverted data={[...]} refreshing={this.state.isLoading} onRefresh={this.someListUpdatingFunction} />```\r\n(just add the 'inverted' attribute to any RN ```<FlatList/>``` to reproduce, then try pulling **down** to refresh, then try pulling **up** to refresh)\r\n\r\n### Expected Behavior\r\nonRefresh should allow users to refresh using the **most common** way that users have been trained to refresh data over the years, which is to \"pull **down** to refresh\" and see an ActivityIndicator spinning **above** the FlatList, **never** below it... this should be the default **even when** inverted={true}\r\n\r\n### Actual Behavior\r\nuser has to pull UP to refresh (with Activity Indicator at the bottom) ... literal vs intuitive: when taken \"literally\", i can agree that this is expected behavior since it is after all \"inverted\" ... however, when taken \"intuitively\", it's not so expected, **especially** for users... I don't think app users have ever been trained to pull up to refresh data, except for maybe in the \"OfferUp\" chat app!\r\n\r\n### Most Applicable Use Case\r\n- a chat app, where users pull down to load more chat history that's appended above, similar to how it's done in iOS Messages app\r\n- UIs like terminals, event logs, chat, etc... where it's common to insert new content from the bottom and load old content when the user scrolls to the top or pulls down to refresh\r\n\r\n### Demo\r\nhttps://snack.expo.io/S1UOyWgSM\r\n(to reproduce, just add the 'inverted' attribute to any RN ```<FlatList/>``` component using v0.53.0 or any version of RN that supports FlatList)"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/442338663","html_url":"https://github.com/facebook/react-native/issues/17553#issuecomment-442338663","issue_url":"https://api.github.com/repos/facebook/react-native/issues/17553","id":442338663,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjMzODY2Mw==","user":{"login":"ChenLi0830","id":9557418,"node_id":"MDQ6VXNlcjk1NTc0MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9557418?v=4","gravatar_id":"","url":"https://api.github.com/users/ChenLi0830","html_url":"https://github.com/ChenLi0830","followers_url":"https://api.github.com/users/ChenLi0830/followers","following_url":"https://api.github.com/users/ChenLi0830/following{/other_user}","gists_url":"https://api.github.com/users/ChenLi0830/gists{/gist_id}","starred_url":"https://api.github.com/users/ChenLi0830/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChenLi0830/subscriptions","organizations_url":"https://api.github.com/users/ChenLi0830/orgs","repos_url":"https://api.github.com/users/ChenLi0830/repos","events_url":"https://api.github.com/users/ChenLi0830/events{/privacy}","received_events_url":"https://api.github.com/users/ChenLi0830/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T06:48:03Z","updated_at":"2018-11-28T06:48:03Z","author_association":"NONE","body":"Inspired by @mrozbarry, here is what I did as a workaround. \r\n\r\n```\r\n        <ScrollView\r\n          contentContainerStyle={{\r\n            flexDirection: 'row',\r\n            alignSelf: 'flex-end',\r\n            flexGrow: 1\r\n          }}\r\n          refreshControl={<RefreshControl refreshing={fetchingMore} onRefresh={onFetchMore} />}\r\n        >\r\n          <FlatList\r\n            inverted\r\n            style={styles.list}\r\n            data={messages}\r\n            keyExtractor={this.extractItemKey}\r\n            renderItem={this.renderItem}\r\n          />\r\n        </ScrollView>\r\n```\r\nNote that it's important to have the `flexGrow: 1` style in scrollView, otherwise the FlatList would flow at the top of the scrollview when it's not full. "}}
{"actor":{"display_login":"ChenLi0830"}}