Well, for that people who's looking for the same thing, I've fixed it by styling the first and last child of each section. This means, on the rendererItem={(item, index, section) =>...}
, we are able to check if index === section.data.length - 1
, this means it's the last child so apply border bottom radius. If index === 0
, this means it's the first child of every section, so we apply border top radius.
I've seen a related post, but it didn't work for me. Also, in my case, my SectionList
data is dynamic, I have so many sections, so using FlatList
for every section of my SectionList
is not optimized.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.