-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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] Rows aren't rendered until scroll #1831
Comments
+1 |
This should be fixed in 0.7 |
I was experience the same exact problem. cloneWithRows works fine. but cloneWithRowsandSections doesn't. |
Are you seeing cloneWithRowsandSections not working with 0.7? Also, you might want to try setting initialListSize to a larger number - that might help as a workaround if things aren't fixed in 0.7 for you. |
Bigger initialListSize does not help and 0.7 I have not tried yet because vendors dependency. As it will be possible I let you know about 0.7 if somebody will not be quicker :) |
Having the same issue with cloneWithRows in version 0.6, was working in 0.5. |
Haven't tried it in 0.7. Will give it a try. I know that I also had tried setting the initialListSize to a higher number previously and didn't help. |
worked in 0.7 |
Also not working in 0.7.1 |
Having the same issue with cloneWithRows in version 0.7.1 |
For me it works well in 0.7.1. |
Does not work in 0.8.0. Still using |
|
@coderdave actually |
@sahrens @ide @michalraska my renderRow: function (rowData, sectionID, rowID) {
return (
<Row
key={rowData.id} data={rowData} scrollY={this.state.contentOffset}
/>
)
}); But fixing this line allowed me to receive the react-native/Libraries/CustomComponents/ListView/ListView.js Lines 342 to 343 in 757d6d2
I changed it from:
to
|
I've noticed this on 0.11.0-rc as well. Here are two examples that can reproduce the issue. Rows: https://rnplay.org/apps/d3DM6A The temporary solution that I came up with was to scroll the ListView 1pt when it mounts.
You can uncomment this section inside the example on rnplay.org for testing. |
Silly question. Could this have anything to do with using NavigatorIOS? I've had some issues w/ rendering, padding, etc all when a list view was rendered as a child of NavigatorIOS. |
@jaygarcia I don't think so since the example's don't make use of NavigatorIOS. Also, in my own project I'm using Navigator instead of NavigatorIOS. |
+1 for me, I'm currently encountering this behaviour when using Navigator. I'm on 0.11 and I use cloneWithRows. |
As workaround, I had to use @christopherdro's solution, but I would need to scroll it sufficiently much to get my items rendered (they are big). Interestingly, the work around is related to the workaround for this bug: #1878 so my final code is:
|
ok, using the code mentioned above, I got some bizarre bugs in nested ScrollViews: After mounting, an onScroll event was triggered which repositioned my initial scroll offset on those views. |
Same issues as @Sidnicious on 0.11.0. My app has had this issue since an early version of react-native. Everything works as expected if I move the |
I am experiencing the same issue using |
I have this issue in constructor(props) {
super(props);
var ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
this.state = {dataSource: ds.cloneWithRows(Array.apply(null, {length: 100}).map(Number.call, Number))};
}
render() {
return (
<ListView
style={{paddingTop: 20, flex: 1}}
dataSource={this.state.dataSource}
renderRow={(rowData) => <Text>{rowData}</Text>}
/>
) |
For me this problem just showed up when upgrading from ¯_(ツ)_/¯ |
same issue here with 0.15.0 , tried all the tricks, no luck. ios 9.1 iphone 6 |
@nicklockwood - can you help out here? Seems like there are still some bugs. |
0.14 ,same issue |
I just updated and I'm still seeing this issue on
|
i think |
I believe we're still seeing this on 0.50.3. Can anyone else confirm? |
I fixed this issue by switching to FlatList.
…On Fri, Nov 17, 2017 at 8:39 AM Colin Ramsay ***@***.***> wrote:
I believe we're still seeing this on 0.50.3. Can anyone else confirm?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1831 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZnGZ9oz7uKXx-wz3KFg-FSIzejAfM6ks5s3bavgaJpZM4FP1nt>
.
|
Ah, we're already using FlatList. |
This is still a problem with 0.50.3. removeClippedSubviews don't seem to have any effect. Can we reopen this please? |
We still have an issue in 0.50.3. Please reopen this one. |
Sorry to bother again, but can we reopen this please? This is a pressing issue. |
Ran into this using the latest Expo React Native SDK. It only happens to the third ListView in a TabNavigator. If I swap the 2nd and 3rd, then the new 3rd page will be affected. removeClippedSubviews did fix it in my case though. |
…random FlatList bug that keeps content hidden until the carousel is scrolled See facebook/react-native#1831
using |
For flatlist this could be caused by updating the same array. FlatList checks if data is different. So make use of immutable arrays |
removeClippedSubviews={false} fixes the bug for my case.
@edmengel is right. I was working on a project and had exactly the same bug.
When I changed search page(which contains a listview) from third tab to second tab, listview worked fine. |
Found a working Hack for this.
|
|
Same issue on Unfortunately, in our case, it is not an option, since it is required to avoid missing images on Android #13600 (comment) Scrolling back and forth on render only happens after navigation so, it looks like transitioning to an initially blank screen. Flexing the view didn't help either. Any other suggestions? |
I found it to only happen after certain scroll position... Using chrome-devtools to inspect the view I can see that all the subviews are clipped. Still stuck, @hramos please re-open. |
Still having a problem with such a simple function? This is why we moved away from React Native back to straight Native code. |
If it’s that simple, please lend out a hand in order to fix it @petersuwara |
This issue has been closed for a while. If this is affecting you, please open a new issue and provide as much detail as possible. I'm locking this issue as the original problem reported here was fixed, and it's not clear each person who has commented afterwards is facing the exact same problem. We use |
Hi,
I have list view which displays partially local and partially remote data. Local data are initial for ListView.DataSource. This datasource is set in state of my custom component which wraps ListView and passed in render method to ListView. When are remote data received, new datasource is cloned by cloneWithRowsAndSections method and set to state of custom component. Problem is that are re-rendered only already displayed rows and new rows are rendered after scroll.
Is it bug or how I should to force rendering of ListView? With react-native 0.5 it worked but after upgrade to 0.6 it behaves as described above.
The text was updated successfully, but these errors were encountered: