Skip to content

Unexpected margin/spaces above ListHeaderComponent #201

Open
@bryanprimus

Description

@bryanprimus

I have this code that uses FlatGrid component

<FlatGrid
  data={[1, 2, 3, 4]}
  renderItem={() => <Text>Hello world</Text>}
  style={{ backgroundColor: 'red' }}
  ListHeaderComponent={
    <Box>
      <Text fontSize="xl">HELLO HEADER</Text>
    </Box>
  }
  ListHeaderComponentStyle={{ backgroundColor: 'white' }}
  stickyHeaderIndices={[0]}
/>

It renders like this
image

not sure why that spaces were added. but it's not appear when i change it to FlatList

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions