Closed
Description
SectionList.scrollToLocation
internally calls VirtualizedList.scrollToIndex
. Calling it with {itemIndex: 0, sectionIndex: 0}
will scroll to the first element, but in the case of a header, will leave the header offscreen.
In writing this up, I discovered an ugly hack workaround that takes advantage of the calculation code: {itemIndex: 0, sectionIndex: 0, viewPosition: 100}
will scroll to the top of the page (or some sufficiently high number to guarantee the code clamps to 0).