I've been able to render the Sectionlist in React Native with horizontal={true}, but when I have two problems with the section header.
horizontal
is a prop of ScrollView. Setting horizontal={true}
will render every child component of a ScrollView to be horizontally rendered, be it the header or footer or empty component. If you need a layout as what you have drawn under "Expected", you have to make separate View
for that.
It makes sense to make everything horizontally in-line, if you are setting horizontal
to true. If a SectionList
is rendered horizontal, its sections should come up horizontally. If you don't give section headers in between two sections, how will user differentiate between two sections? If you want to have a section header to start at the top of a new section, that's specific to you and you may have to write your own implementation of that.