React-native-reanimated-bottom-sheet: [question] Unable to view full content inside bottom sheet (Scroll Issue)

Created on 14 May 2019  路  6Comments  路  Source: osdnk/react-native-reanimated-bottom-sheet

Is it a default behaviour that the bottom sheet will limit the scrollable content we see within the bottom sheet or am I doing something wrong. I have a reasonable amount of content within the renderContent but I am unable to scroll below a certain point. Any advise?

Please have a look at the following gist and advise if I am doing something wrong here.

https://gist.github.com/cedricavigo/7388438f70a6ac077ed2c0440f75d71d

All 6 comments

Are you giving height for the parent inside renderInner ? What is the style for styles.panel in your gist example ?

@roshangm1 - Yes I am setting the height of the panel as screen height. So, the scroll works for the height that we define?

Yes, that might be the case. You can try giving height 100%.

Tried 100%, but the scroll is completely not working. Turns out we have to set the height correctly to view all the content inside the scroll view. But the problem with my usecase is I will be loading the content dynamically and we can't define a height. I will try to find if there is a way to detect the height of a holder programatically and apply that height to the panel. Please suggest If you have any other solution in the meantime.

Thanks @roshangm1

I usually set the height to be the height of the device (from Dimensions api). This results in blank spaces when not enough content however.
@osdnk and @everyone any thoughts on this ?

The following solution works fine for me to get the height from native layout property and set the height from state.

find_dimesions(layout) {
const { x, y, width, height } = layout;
this.setState({
bsHeight: height
})
}

Thanks for your support @roshangm1 and thanks @osdnk for the awesome library.

Was this page helpful?
0 / 5 - 0 ratings