reactjs - Which SectionHeader is Sticky in react-native? -


i'm using react-native's sectionlist component implement list sticky section headers. i'd apply special styling whichever section header sticky.

i've tried 2 methods determine sticky header "sticky," , neither have worked:

  1. i tried use each section header's onlayout prop determine each of y offsets, , use in combination sectionlist onscroll event calculate section header "sticky".
  2. i tried use sectionlist's onviewableitemschanged prop figure out header sticky.

approach #1 doesn't work because event object passed onlayout callback contains nativeevent height , width properties. approach #2 doesn't work because onviewableitemschanged callback appears invoked inconsistent data (initially, first section header marked viewable (which is), then, once becomes "sticky," marked not viewable, , further scrolling inexplicable marked viewable again while still "sticky" [this final update seems arbitrary]).

anyone know solution works?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -