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

Using Percentage Value in Horizontal Padding of ContentContainerStyle with infiniteQuery crashes the list #1501

Open
sambouchard-newforma opened this issue Jan 30, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@sambouchard-newforma
Copy link

sambouchard-newforma commented Jan 30, 2025

Current behavior

When using a list with infinite scrolling using useInfiniteQuery that has a contentContainerStyle with a percentage value for paddingHorizontal the list is not rendered at all

Expected behavior

The list should render with the correct padding applied. Using numerical padding works as intended. Using the FlatList Native component instead of FlashList works

To Reproduce

See the example here : https://snack.expo.dev/@samuelbouchard/flashlist-infinitequery-bug

Switching the value from 30% to 30 in the component DataList.js works, the list appears normally

Switching FlashList to FlatList also fixes the problem

Platform:

  • [ x] iOS
  • [ x] Android

Environment

1.7.1 (Also happening on 1.7.2)

expo 52

Also tested with React-Native 0.76.5 (same behavior happens)

@sambouchard-newforma sambouchard-newforma added the bug Something isn't working label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant