Skip to content

dynamic item height issue #347

@necipfzlakay

Description

@necipfzlakay

Hi there

I was using SectionList for a huge infinity scroll list. However, after 50+ items, scrolling was terrible. when you reach the end of the list it throws you half of it or there were different scrolling issues.

Now I tried to use this library but SectionList logic is different.
My list looks like:

const data = [
{ sectionHeader: 'title 1', data: [ ... ,...] },
{ sectionHeader: 'title 2', data: [ ... ,...] },
{ sectionHeader: 'title 3', data: [ ... ,...] },
] 

but this library' s sectionlist data must be:

const sections = [
  [
    { label: "1", value: 1 /* ... */ },
    { label: "2", value: 2 /* ... */ },
  ],
  [
    { label: "3", value: 3 /* ... */ },
    { label: "4", value: 4 /* ... */ },
  ],
  [
    { label: "6", value: 6 /* ... */ },
    { label: "6", value: 6 /* ... */ },
  ],
  /* ... */
];

how can I determine the section header's content?

Also when I am using Standard list, I can not give exact itemHeight because my section's data is dynamic and I can not reach length of the section items outside of the renderSection. so items are getting into each other.

Is there anyone who has an idea?

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