-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlatList blanks out when scrolled quickly (on large dataset) #23442
Comments
This comment has been minimized.
This comment has been minimized.
react native upgraded, but issue persists @react-native-bot |
@mkashlev From the FlatList documentation:
|
@lucsky Thanks for a quick response! This makes sense. One thing I noticed that in some cases, the screen does not get re-rendered, no matter how long I wait. Its a different thing from screen rendering being delayed (at least content shows up later). In my case the content does not show up. |
Was wondering if anyone has experienced this area, or if I'm not doing it correctly? @sahrens |
@mkashlev : I have definitely faced the issue where the component never updates. Make sure your keyExtractor function is correct. Removing removeClippedSubviews and getItemLayout has fixed this for me but causes performance problems. Looks like there may be subtle bug in the flatlist implementation. |
I have the same issue, even for 100 items this happens to my flatlist
|
@mkashlev did you find any solutions for this issue? |
@muhammadwfa - still no solution. |
I have this issue too and onreachend event calling with delay |
As noted by @lucsky, the documentation mentions this trade-off and thus it is currently considered to work as intended. What the docs don’t do a great job at is explaining to you how you can fine-tune this behaviour to make the right trade-offs for your situation, something that I’m sure PRs for would be much appreciated. In an effort to reduce the noise in the issue tracker, I’ll close this issue, but will leave you with a few links that were helpful to me recently: |
do you have some solution for this problem? |
Now I am using scrollview, it works well. |
Any solution for this in Flatlist |
Keep watching. |
getItemLayout has fixed this for me. |
@Rahulkishanm Can you give any code and how you have calculate the getItemLayout for entire list? |
@Rahulkishanm getItemLayout props not worked for me
|
@nihp Can you please post a full code of your flat list implementation as It can be improved with some props that I can help you with. |
@Shanie1331 I have updated my flatlist implementation above. Can you look into this? I need solution for two issues
|
Shanie1331 Any update |
Can you wait for a while as I need to replicate your implementation? |
Okay. Thanks |
Hello, We are experiencing this bug as well with RN61. |
Me tooo |
Hi, |
@SelvaraniAlagumuthu Can you give your render Item method in brief |
Can you share your code of renderItem , i am facing same issue. |
Here I don't want to add scroll view for the screen. Any solution other
than this
…On Fri, Jan 3, 2020 at 3:21 PM kamal verma ***@***.***> wrote:
Hi,
I am also faced while scrolling the list i got blank pages. After adding
scrollview in flatlist now its working fine. Here my code please check may
be its helpful.
<View style={{ flex: 1}}>
<FlatList
data={data }
renderItem={({ item }) => <this.Item item={item} />}
keyExtractor={item => item.id}
/>
Thanks
Can you share your code of renderItem , i am facing same issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23442?email_source=notifications&email_token=AI2HKUWMMLO3LTLBXMW4WR3Q34DBVA5CNFSM4GXJN6FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIAXTXI#issuecomment-570522077>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI2HKUUOVVY2BMFVQ4DHBT3Q34DBVANCNFSM4GXJN6FA>
.
|
Thanks for replying.
*Thanks and Regards*
*Kamal Verma*
*+91-9509371638*
…On Mon, 6 Jan 2020 at 15:23, vishnu ***@***.***> wrote:
<GridView
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
itemDimension={INV_GRID_CELL_WIDTH}
spacing={INV_GRID_SPACING}
items={items}
style={{ flex: 1 }}
itemContainerStyle={{ alignItems: "center", marginTop: INV_GRID_SPACING}}
renderItem={item => (
<View style={{ width: '100%' }}>
<TouchableOpacity style={{ width: '100%' }} onPress={}>
{method}
{method}
{method}
{method}
{method}
{method}
)}
/>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23442?email_source=notifications&email_token=AELAK2XGZLVDA3HGB3AQXJDQ4L5QLA5CNFSM4GXJN6FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIE6YIQ#issuecomment-571075618>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AELAK2VDDUGJ7YBTFDYMMYLQ4L5QLANCNFSM4GXJN6FA>
.
|
Yeah! Thank you, I had a problem => in some cases flatList's callback onEndReached didn't call by scrolling to the end. So, I've added setTimeout on endReached and it works perfect. |
🐛 Bug Report
Contents of FlatList disappear upon quick scrolling
To Reproduce
When a FlatList is scrolled with a pull to refresh and goes through multiple pages, and then scrolled up quickly, the content disappears.
Scroll down FlatList, going through multiple Pull to refresh instances until you have sufficiently large list. Then scroll up quickly, and the content disappears and does not come back. This behavior sometimes happens when you scroll down quickly as well.
Expected Behavior
Content should not disappear when scrolled quickly up or down. This is the purpose of using FlatList over (deprecated) ListView.
Code Example
Even if onScroll or viewableItemsChanged props are commented out, the issue still remains.
Environment
The text was updated successfully, but these errors were encountered: