Questions tagged [react-native-flatlist]

Flat lists is a component for rendering basic lists in React Native.

Documentation: here

2009 questions
0
votes
2 answers

How to fetch more data when scroll up FlatList react native?

I'm applying lazy load into flatlist. But I only fetch more data when scroll down the lasted item. How can I implement fetch more data when scroll up. I tried onRefresh I dont' know why the list didn't update but the data had changed. Anyone have…
0
votes
0 answers

How to pass image as prop to custom component?

I have a custom component and flatlist in the search screen, I'm trying to load each result in the custom component. Data inside the flatlist is an array of objects which is a response from API. When I pass image, name and other details to the…
0
votes
2 answers

FlatList item click is not rendering this

export default class HistoryScreen extends BaseScreen { constructor(props){ super(props); this.state = { mainListData:[], listData:[], searchText:'', }; } …
Muhammad Umar
  • 10,865
  • 19
  • 79
  • 179
0
votes
1 answer

React-native - How to create a scrollable flatList in which the chosen item is the one at the middle?

I would like to create a scrollable FlatList to select only one item among a list. After the user scroll the list, the selected item will be the one in the colored rectangle (which have a fixed position) as you can see here : Actually I'm only able…
Mairkur
  • 125
  • 10
0
votes
1 answer

How to set the star and unstar the image on touchableOpacity in react-native

I need to star and unstar the element in the Flatlist. Here I have used the Flatlist and renderItem inside the class. Used a constant outsite the class and included in the renderItem. (i.e) structure.js is like below imports... const…
sejn
  • 911
  • 3
  • 11
  • 38
0
votes
0 answers

Set State in FlatList

I'm creating simple component with multiple object of state i want to set state value through inside FlatList but reason is that when run the code click on button where i'm calling callback function page goes blank then get error import React,…
0
votes
2 answers

Flatlist is not Scrolling to desired offset when scrollToOffset is used

here is my FlatList code this.flatListRef = ref} data={this.state.data} renderItem={({ item, index }) => this.renderItems(item, index)} onScroll={(e) => this.handleScroll(e)} /> here is handleScroll method…
Mighty
  • 1,178
  • 2
  • 17
  • 35
0
votes
1 answer

How to display flatlist's selected item from one screen to another screen in react-native?

How to display flatlist's selected item from one screen to another screen in react-native ? I am trying to select gender using flatlist .so when i select gender from flatlist at that time i want to show that selected gender value on next screen in…
0
votes
2 answers

Flatlist not update immediately after button clicked react native

I have some sample data of array and I want to filter the flatlist based on selected criteria(state). However, the state variable is changed when my button click but the flatlist didn't. I have to click the button second time so that the flatlist…
S.Chern
  • 25
  • 6
0
votes
1 answer

How to make search bar with dropdown list in react-native?

I want to create a search bar with a drop-down list with react-native, more like this image I know there are lots of libraries regarding these which makes my task easy but I have just started with react-native so for my knowledge I wanna know how…
0
votes
1 answer

Use a function sent from Flatlist to a sub component

I'm trying to use a function from a class into another, when dealing with Flatlist. Here is my class where my flatlist is : _displayDetailsForMyItem = (idItem, type) => { this.props.navigation.navigate('ItemDetails', { idMyItem: idItem,…
Alexandre
  • 1,189
  • 2
  • 13
  • 25
0
votes
1 answer

React Native Separate View Component Scrollable with FlatList?

Is there a way to scroll a separate component with a FlatList? Some component outside of FlatList Porfile Information Above FlatList How to scroll with flatlist
hellomello
  • 7,510
  • 33
  • 121
  • 258
0
votes
3 answers

Why isn't flatlist not able to map through and display the data?

I am using Zomato API to get the list of restaurants, data is in the form of the array which has object restaurants in which there are different restaurant objects and then their name and other details. It's my first time using a flat List and I am…
0
votes
1 answer

How to execute a function when some item renders in react native?

I have a sectionlist of Contacts where I am displaying both device and online contacts of a user. The online contacts api doesnt give me all the contacts at once. So I have to implement some pagination. I am also fetching all device contacts and…
0
votes
0 answers

FAB native-base is not displaying under the Flatlist-renderItem

I want to display multiple FAB based on numColumns Unable to render the FAB object inside the Flatlist
Pavan
  • 1,463
  • 1
  • 15
  • 17
1 2 3
99
100