Skip to content
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

Is this compatible with the new FlatList component? #41

Open
Talor-A opened this issue Mar 14, 2017 · 20 comments
Open

Is this compatible with the new FlatList component? #41

Talor-A opened this issue Mar 14, 2017 · 20 comments

Comments

@Talor-A
Copy link

Talor-A commented Mar 14, 2017

Title ^. and if this isn't compatible, what needs to be done to make it compatible?

@ide
Copy link
Member

ide commented Mar 16, 2017

We haven't tried it at all. My guess is that it won't work, I'm not sure if FlatList supports composing scroll views yet. If it does, it wouldn't be too hard to get this component working with FlatList.

@Talor-A
Copy link
Author

Talor-A commented Mar 24, 2017

@ide since react native will be transitioning to FlatList in the next few months are there plans in the future to expand this library to FlatList as well?

@jpshelley
Copy link

I tried it and is somewhat works. I'm testing against Android however and issue #33 is stopping me from testing it fully. Is there any thought as to what is causing 33 to help get it up to speed for the flatlist?

@ide
Copy link
Member

ide commented Apr 4, 2017

No current plans to support FlatList -- it's not something I'm against but also don't have as much of a need compared to other projects.

@jcharbo
Copy link

jcharbo commented Apr 4, 2017

It appears that the children are being passed differently to the create element function for the scrollview in virtualizedlist. You can modify that code to make it work or for now you can make a quick fix in your renderitem function. Just wrap the child in a view with the style {
transform: [
{ scaleY: -1 },
],
}

@itinance
Copy link

I've tried it out with the new FlatList-Component and it isn't working well.

  1. The rows are drawn upside down (even the text)
  2. the Event "onViewableItemsChanged" usually returns exactly those rows, that are currently visible while scrolling. When using InvertableScrollView the FlatList returns ALL rows in this event with the first rendering, regardless whether they are visible or not

Any ideas?

@itinance
Copy link

itinance commented May 10, 2017

The issue with ListView is that it is already deprecated since 0.43 and also that no pullrequests got merged anymore, even those from Januar 2017, with the argumentation that it is deprecated.

@guysegal
Copy link

@jpshelley how did you make it work?

@nickcharles
Copy link

For those who are looking for a quick drop in I've thrown together an implementation of this using the new FlatList component, you can find the code here: https://github.com/nickcharles/react-native-invertible-flat-list

@braco
Copy link

braco commented Jun 7, 2017

There are improvements to FlatList in the latest release, does this unblock anything?

https://github.com/facebook/react-native/releases/tag/v0.45.0

@nickcharles
Copy link

@braco don't think so, I'm going to continue using what I wrote. I'll update it for 0.45 next week.

@psaia
Copy link

psaia commented Jun 11, 2017

Really nice work with react-native-invertible-flat-list, @nickcharles. Works great.

@lorenzsell
Copy link

There's also this StackOverflow answer which worked really well for me: https://stackoverflow.com/questions/43399343/inverting-a-flatlist#_=_

@nickcharles
Copy link

@lorenzsell that's exactly what my package does =)

@JohnDotOwl
Copy link

?????

@guysegal
Copy link

FlatList now has an inverted prop

@mattisfrommars
Copy link

Given the inverted prop on FlatList, should that be the preferred method of creating inverted scroll lists now?

@ide
Copy link
Member

ide commented Nov 20, 2017

Yeah, I would use the built-in prop if that works well.

@nickcharles
Copy link

I would also encourage using that instead of custom libraries.

@lgh06
Copy link

lgh06 commented Dec 11, 2019

Also faced upside down issue.

Update: used FlatList's inverted prop, removed this lib, and modified scrollToXxx methods. works fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests