rgommezz / react-native-scroll-bottom-sheet

Cross platform scrollable bottom sheet with virtualisation support, native animations at 60 FPS and fully implemented in JS land :fire:
MIT License
1.54k stars 64 forks source link

useScrollToTop hook is not working with library #56

Closed fedarenchyk closed 3 years ago

fedarenchyk commented 3 years ago

I'm trying to implement scrollToTop when clicking on the tab bar icon. The hook works great with ScrollView and FlatList, the documentation also states that it works with SectionList, but this does not happens. I'm trying using ref like: useScrollToTop(ref.current.getNode());, also tried use like useScrollToTop(ref).
<ScrollBottomSheet componentType="SectionList" -> this is my config for ScrollBottomSheet.

does scrolling works with this library at all?

also tried to reproduce the ref.current.getNode (). scrollTo ({y: 0, animated: true}) method described in the library documentation, not working for me

link to react navigation hook: https://reactnavigation.org/docs/use-scroll-to-top/

Снимок экрана 2020-10-28 в 16 15 30