All Questions

Filter by
Sorted by
Tagged with
108votes
8answers
116kviews

Hide scrollbar in FlatList (React Native) in Android

I am trying to use FlatList (React-native) in my app. I am using it horizontally and can see the scrollbar. There is an option in ScrollView to hide the scrollbar but not in FlatList. Has anyone been ...
user avatar
101votes
20answers
146kviews

How to re-render flatlist?

Unlike ListView we can update this.state.datasource. Is there any method or example to update FlatList or re-render it? My goal is to update the text value when user press button ... renderEntries({ ...
user avatar
  • 1,802
94votes
12answers
98kviews

React Native FlatList with columns, Last item width

I'm using a FlatList to show a list of items in two columns <FlatList style={{margin:5}} data={this.state.items} numColumns={2} keyExtractor={(item, index) => item.id } renderItem={(...
user avatar
  • 3,823
74votes
7answers
77kviews

VirtualizedList: You have a large list that is slow to update

I use FlatList with large number of items. I get following alert from Expo XDE. VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders ...
user avatar
52votes
16answers
53kviews

React Native FlatList last item visibility issue

I am fetching products list and then displaying using a FlatList, my list contains 5 items and as you can see FlatList row height is variable because of varying description text. So the issue is my ...
user avatar
52votes
6answers
49kviews

How to get currently visible index in RN flat list

I have a horizontal flat list where each item is width:300 All I am trying to do is to get index of currently visible item. <FlatList onScroll={(e) => this.handleScroll(e)} ...
user avatar
  • 7,483
48votes
10answers
99kviews

React Native - Use a keyExtractor with FlatList

I have been getting the: "VirtualizedList: missing keys for items, make sure to specify a key property on an item or provide a custom keyExtractor" pretty confusing..., the array i am passing it ...
user avatar
  • 573
43votes
4answers
44kviews

React-Native scroll to top with Flatlist

I'm having a lot of trouble scrolling to the top of my Flatlist so any help would be greatly appreciated! Essentially it fetches the first 5 items from firebase, then when onEndReached is called we ...
user avatar
  • 603
41votes
5answers
37kviews

TypeScript React Native Flatlist: How to give renderItem the correct type of it's item?

I'm building a React Native app with TypeScript. renderItem complains that the destructured item implicitly has an any type. I googled and found this question and tried to implement what they teach ...
user avatar
  • 10.4k
40votes
5answers
39kviews

Scroll to end of FlatList after displaying the keyboard

I have a FlatList inside a KeyboardAvoidingView. When the keyboard is displayed I would like to scroll to the end of the FlatList. I am listening for the 'keyboardDidShow' event which does get fired,...
user avatar
35votes
7answers
27kviews

FlatList onEndReached being called multiple times [duplicate]

I'm making a react native project where user can search images using Flickr API, Everything else is working fine but the problem i'm having while implementing pagination. I have used FlatList's ...
user avatar
  • 1,856
34votes
8answers
41kviews

How to change height of <FlatList/> in react native?

I want to change width and height of <FlatList />. I set the height style to the current <FlatList /> but it never worked. I can change the height of <FlatList /> in no way. This ...
user avatar
  • 1,789
34votes
9answers
20kviews

FlatList ScrollView Error on any State Change - Invariant Violation: Changing onViewableItemsChanged on the fly is not supported

onViewableItemsChanged does not seem to work when there is a state change in the app. Is this correct? Seems like it wouldn't be very useful if this were the case.... Otherwise, users will be forced ...
user avatar
  • 1,507
31votes
3answers
18kviews

React-Native text get's vertically cut off for no reason

I have an interesting bug that is happening to my text. For some reason text is randomly getting cut off like so: const styles = StyleSheet.create({ container: { flex: 1, alignItems: '...
user avatar
  • 8,171
31votes
3answers
5kviews

Tabs with FlatLists inside ScrollView - like Instagram or Twitter profile pages

I would like to have a set of tabs that each have a FlatList inside a ScrollView. This is similar to the layout of Instagram or Twitter. I am aware that there are some issues with having a FlatList ...
user avatar
  • 1,524

15 30 50 per page
1
2 3 4 5
154