Skip to content

[FlatList] does not accept (number) zero or empty string items #13578

@josvos

Description

@josvos

When using plain numbers or strings as items (in the "data" list property), rendering FlatList results in an error when encountering number 0 or string ''. The error is "No item for index X" where X is the index of the 0 or '' in the list. Examples where the error is "No item for index 2" are data={[-2, -1, 0, 1, 2]} and data={['a', 'b', '']}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions