react-native-dual icon indicating copy to clipboard operation
react-native-dual copied to clipboard

SectionHeader don't stick on DualSectionList

Open AlexisLeon opened this issue 7 years ago • 3 comments

The renderSectionHeader element isn't sticking to top on scroll for the <DualSectionList /> component. I think this is related to contentInset and contentOffset.

  • Tested on iOS.

AlexisLeon avatar Feb 12 '18 20:02 AlexisLeon

I'll check tonight. Thanks for raising the issue ;)

sospedra avatar Feb 13 '18 08:02 sospedra

Can u provide an example?

sospedra avatar Mar 29 '18 14:03 sospedra

Example:


const MyCustomHeader = ({ title }) => (<View style={...}><Text>{title}</Text></View>);

<DualSectionList
  stickySectionHeadersEnabled
  renderItem={({item}) => <Text>{item}</Text>}
  renderSectionHeader={({ section: { title } }) => <MyCustomHeader title={title} />}
  sections={[
    {data: [ ... ], title: "Section 1" },
    ...
  ]}
/>

AlexisLeon avatar Mar 31 '18 00:03 AlexisLeon