SectionList wont render section header
Clash Royale CLAN TAG#URR8PPP
SectionList wont render section header
My SectionList will not render anything inside the renderSectionHeader function. It will create the View but it will be empty. I have tried putting text, Image, with no luck. The item rows work perfectly fine, but the sectionHeader won't have any content.
render()
return(
<SectionList
style=fill
sections=deals
renderItem=
(item, index, section) => (
<View style=styles.container>
<Text style=[txt.med.left, styles.text]>
item.name
</Text>
<Text style=[txt.med.right, styles.text]>
item.date
</Text>
</View>
)
renderSectionHeader=
(section: title) => (
<View style=styles.container2>
names[title]
</View>
)
keyExtractor=(item, index) => item + index
/>
)
}
and here is names
export const names =
item1:
<Image
source=require('./path')
style=img
resizeMode="contain"
/>,
item2:
<Image
source=require('./path')
style=img
resizeMode="contain"
/>,
item3:
<Image
source=require('./path')
style=img
resizeMode="contain"
/>
On top of that, I cannot scroll down, it just bounces back up.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.