jsoendermann / rn-section-list-get-item-layout

:black_square_button: Easy getItemLayout props for react-native SectionLists.
https://medium.com/@jsoendermann/sectionlist-and-getitemlayout-2293b0b916fb
Other
221 stars 32 forks source link

First Item of each section, having different height , How to solve it? #15

Closed desis123 closed 4 years ago

desis123 commented 4 years ago

First of all thanks for this nice library to make life a lot easier. I have a question, In my section, First row item of each section has different height than other items . I am kind of puzzled to solve that issue. Any help will be greatly appreciated. Thansk in advance.

jsoendermann commented 4 years ago

Hi. getItemHeight is given the row index as its third parameter. Something like getItemHeight: (rowData, sectionIndex, rowIndex) => rowIndex === 0 ? 100 : 50 should work.

desis123 commented 4 years ago

@jsoendermann Thanks for quick reply.. I will try now.. and let you know ...

desis123 commented 4 years ago

@jsoendermann Seems like everything is working perfectly ...