react-native-collapsible-tab-view icon indicating copy to clipboard operation
react-native-collapsible-tab-view copied to clipboard

onScroll on flatlist does not work

Open nica0012 opened this issue 2 years ago • 4 comments
trafficstars

Love this package. The only issue I have come across is onScroll does not seem to work on the tabs.flatlist.

I am trying to detect scroll distance to a animate a nav bar title. I cant use the hooks because I am coding inside of a class component...

Is anyone else facing this issue?

nica0012 avatar Jul 27 '23 00:07 nica0012

you can use the useCurrentTabScrollY hook to detect scroll distance.

Adil21 avatar Aug 03 '23 12:08 Adil21

@Adil21 Hi, I completely converted my class component to a functional component to use this hook, but it still does not seem to work.

I tried importing useCurrentTabScrollY from the library which didn't work so I looked at the example and copied that code into my own hooks folder but that did not work either...

I get the following error, I've seem others with it too:

usetabcontext must be used inside a tabs.container

nica0012 avatar Aug 03 '23 13:08 nica0012

@Adil21 Hi, I completely converted my class component to a functional component to use this hook, but it still does not seem to work.

I tried importing useCurrentTabScrollY from the library which didn't work so I looked at the example and copied that code into my own hooks folder but that did not work either...

I get the following error, I've seem others with it too:

usetabcontext must be used inside a tabs.container

did you find any solution for this?

kurniawanj26 avatar Nov 15 '23 01:11 kurniawanj26