Skip to content

numColumns stopped working after RN 0.77 on iOS #1508

Open
@brunozampirom

Description

@brunozampirom

Current behavior

After updating my app to React Native 0.77, my lists with more than one column are not working, they are always being rendered with only one column. Only happening on iOS, Android is fine.

Image

Expected behavior

Correctly render more than one column

To Reproduce

const DATA = [
    {
        title: "First Item",
    },
    {
        title: "Second Item",
    },
    {
        title: "Third Item",
    },
    {
        title: "Fourth Item",
    },
];

const MyList = () => {
    return (
        <FlashList
            data={DATA}
            numColumns={2} // here
            renderItem={({ item }) => <Text style={{ margin: 6 }}>{item.title}</Text>}
            estimatedItemSize={200}
        />
    );
};

Platform:

  • iOS
  • Android

Environment

"@shopify/flash-list": "^1.7.3",
"react-native": "^0.77.0",

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