Skip to content

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

Open
@sambouchard-newforma

Description

@sambouchard-newforma

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions