Shopify / flash-list

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

style prop seems to be ignored #1251

Open lexi-stein opened 5 months ago

lexi-stein commented 5 months ago

Current behavior

Pass a margin or something into the style prop

Expected behavior

A margin gets added to the scroll container

To Reproduce

<FlashList style={{ margin: 20 }} ... />

Platform:

Environment

1.6.4

KallumParr commented 4 months ago

I believe there's a warning thrown from FlashList when using the style prop, you need to instead use contentContainerStyle.

KristineTrona commented 3 weeks ago

Would be nice if TS showed an error when trying to pass a style prop to the FlashList rather than just showing a runtime warning