Questions tagged [react-native-flatlist]

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

Documentation: here

2009 questions
0
votes
1 answer

FlatList filter showing extra data

I have a FlatList in which I display some jobs that I get from my server. I recently added filters and want to display a filtered list of jobs whenever the user selects a filter. I use extraData in my FlatList to signal that I want it to re-render.…
Narcis
  • 133
  • 2
  • 12
0
votes
1 answer

Multi-select items with flatlist

I'm trying to implement a flatlist with multi-selection but when i press on an item, it changes the background for all items, how can i fix that ? state = { authUsers: [], selMembers: [], selected: false } render() { …
0
votes
1 answer

React-Native Handle huge multiple number of inputs in accordion with single click from parent component

I am kind of beginner in React world. In my project, i have a different number of custom accordion objects that has flatlist of text inputs. How can i handle such a input system with single button click from parent of accordion objects. I want to…
0
votes
0 answers

Encountered two children with the same key (react-native, js)

I have encountered this problem Encountered two children with the same key, `11`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is…
0
votes
2 answers

How to set value on text component when i clicked on item of flatlist in react-native?

How to set a value on text component when i clicked on an item of the flatlist in react-native? I want to display the value of the flatlist on the text component. When I clicked on an item of a flatlist. So please help me how i can achieve this…
0
votes
0 answers

Cannot open file, after share, React-native

I have created a share function using react-native-share which fetches the api, in order to share some images, however when I try to share via whatsapp, it throws me an error: Cannot open file. My share function: shareImage= (item) => { …
0
votes
0 answers

Issue in passing a parameterized component to FlatList

I am trying to create a custom seperator component for FlatList such that it changes color based on a prop. that's passed to it. Here's my Seperator component : ItemSeparator = (seperatorColor) => (
nikel
  • 2,856
  • 8
  • 34
  • 67
0
votes
0 answers

Bad Base-64 as response

I have created a share function using react-native-share for android where I convert the data to base64 and then share as follows shareImage= (item) => { RNFetchBlob.fetch('GET', `some url`+item._id) .then(resp => { console.log('response…
0
votes
2 answers

Flat list single item with two buttons

A flat list displays information from an API, I want to add a delete button for each item. Where user can click on it and be able to delete this specific item. Please check my code below.
0
votes
1 answer
0
votes
1 answer

FlatList ScrollToIndex with onEndReached

I have a FlatList of comments of different height and I need to implement scrolling to some specific element when opening the modal with this FlatList. For some reason the method onEndReached is being called several times if I put ScrollToIndex in…
0
votes
0 answers

TypeScript Error:Unhandled Promise Rejection after attempting to post data

I have created a button Add Margin inside flatlist that is posting data to backend, however when I try to post it throws me Unhandled Promise Rejection error. My add margin function is as follows: margin = () => { let data = { method:…
0
votes
2 answers

Flatlist won't fill the entire screen

So i'm new to react native and mobile dev, i Have a flatlist that i want to stretch on the entire screen ( see the picture i added below ) but i can't seem to make it happen here's my code import React, { Component } from 'react'; import { View,…
Zelda
  • 23
  • 1
  • 6
0
votes
1 answer

How to divide FlatList items with a vertical and horizontal line in React-Native

I would like to separate the items I have inside my Flatlist with a vertical and horizontal line, between the items, just as the green lines show. I tried with the itemSeparator but it just creates a horizontal line. The data is hardcoded waiting…
Aldimir
  • 21
  • 9
0
votes
0 answers

On adding viewpager videos are not getting displayed

I have used a flatlist to list 4 videos getting fetched from an API, however I want them to scroll one at a time, hence added viewpager to render each video as a separate page, however on adding viewpager I do not seem to retrieve the videos on…
1 2 3
99
100