Shopify / flash-list

A better list for React Native
https://shopify.github.io/flash-list/
MIT License
5.68k stars 285 forks source link

ScrollView props #221

Open fortmarek opened 2 years ago

fortmarek commented 2 years ago

FlatList supports all ScrollView props since it uses it under the hood.

We do as well but we have not gone through all of them to verify they won't cause any issues. We should double check the props below:

Here is a list of all the props:

Methods:

gabrieldonadel commented 2 years ago

@fortmarek any plans on making contentContainerStyle match react native View style props?

fortmarek commented 2 years ago

We do plan to make contentContainerStyle more flexible but likely won't get to it in the short term.

kylegillen commented 2 years ago

Any plan to implement the following any time soon, or would I be better off rolling my own solution for something such as a stretchy header that re-appears when scrolling up?

StickyHeaderComponent stickyHeaderHiddenOnScroll

alexdobson commented 2 years ago

We do plan to make contentContainerStyle more flexible but likely won't get to it in the short term.

We've just ran into this issue. Would definitely appreciate full View Style props for contentContainerStyle.

Currently, an inability to set flex: 1 for the content container prevents from being able to center content vertically (lets say for an empty list component for example).

An example of what we're trying to achieve here.

rfahernandez commented 1 year ago

@alexdobson you can use centerContent prop to center a ListEmptyComponent but sadly it only works for iOS.

sanduluca commented 1 year ago

@alexdobson you can use centerContent prop to center a ListEmptyComponent but sadly it only works for iOS.

The prop centerContent does not center the ListEmptyComponent unfortunately (in runtime).

arled commented 1 year ago

I think scrollTo is such a useful prop to have. Weird it is not implemented.

KolissnikBogdan commented 1 year ago

Any plan to implement the following any time soon, or would I be better off rolling my own solution for something such as a stretchy header that re-appears when scrolling up?

StickyHeaderComponent stickyHeaderHiddenOnScroll

hi, I am also interested in this question

carlossalasamper commented 1 year ago

@alexdobson you can use centerContent prop to center a ListEmptyComponent but sadly it only works for iOS.

Any update about this issue? I'm trying to center the ListEmptyComponent in both platforms

VictorioMolina commented 1 year ago

@fortmarek Will it be possible to use flexGrow: 1 in contentContainerStyle? It seems like there isn't a simple way to center ListEmptyComponent with FlashList.

VadzimAlkhimionak commented 1 year ago

@fortmarek Will it be possible to use flexGrow: 1 in contentContainerStyle? It seems like there isn't a simple way to center ListEmptyComponent with FlashList.

faced with the same issue.