benevbright/react-navigation-collapsible

Collapsible not working is some conditions.

Closed this issue · 3 comments

Collapsible is not working when the flatlist or the scrollview height is not long enough.

For example, if I edit your code TabChild1Screen.jss Flatlist data to 20(originally it was 60).

Then, when I reach to the end of the flatlistView the collapsible view won't collapse completely.

To make the collapsible view to work properly, it seems like the flatlist or the scrolllview of the height must be above certain length.

When I scroll to the bottom, is there a way I could make the collapsible view collapse completely?

Regardless of the height of the flatlist or the scrollview.

On which platform is your App running?

https://github.com/benevbright/react-navigation-collapsible#hoc-and-config-method

You may use this function, function setSafeBounceHeight (height), but please note that it's not recommended to use due to the bounce action on iOS.

However, It sounds like you're referring to the limitation of this module. As you pointed out, this module is not relevant to short ScrollView because it's just reacted by the position of scroll.

Thanks for the quick response. I am using both ios and android.

The function setSafeBounceHeight (height) what is this for? and where do i place this code?

You can set the position of the scroll where your header starts to disappear.
You can just call like

import { setSafeBounceHeight } from 'react-navigation-collapsible'

setSafeBounceHeight(0);