Kieran-McIntyre / react-native-section-alphabet-list

A simple React Native component that takes an array of data and renders a SectionList with alphabetically sorted data
MIT License
195 stars 55 forks source link

how does getItemHeight work? #66

Open pierroo opened 1 year ago

pierroo commented 1 year ago

Can we have an example of how getItemHeight works? the doc feels unclear to me;

if my section header is 44px and each of my list items are 40px

what should I put in getItemHeight ?

simonho1025 commented 9 months ago

Yes, the doc is unclear. You can return the number like this:

getItemHeight={() => 40}

also set the sectionHeaderHeight:

sectionHeaderHeight={44}

same issue on #65