question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Listening scroll events in BottomSheetModal

See original GitHub issue

Ask your Question

Hi,

I’m trying to use the onScroll with the BottomSheetModal component

                <BottomSheetFlatList
                    ...
                    onScroll={(event): void => {
                        scrollOffset.value = event.nativeEvent.contentOffset.y
                    }}
                    ...
                />

it doesn’t seem to work. I am missing something?

Thanks in advance

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
fcandicommented, Jun 30, 2021

@ndrkltsk @gorbypark I just tried ScrollView from react-native-gesture-handler as mentioned here: https://gorhom.github.io/react-native-bottom-sheet/troubleshooting#adding-horizontal-flatlist-or-scrollview-is-not-working-properly-on-android

It seems to work nicely now, events included. The horizontal Flatlist is even part of a vertical BottomSheetFlatlist and its behavior including closing the bottom sheet with vertical gestures on the horizontal Flatlist also just works. Latest versions of all components.

0reactions
github-actions[bot]commented, Aug 6, 2021

This issue was closed because it has been stalled for 5 days with no activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not getting callback after adding an event listener for scroll ...
js to register event listener for scroll event. I have a React component that renders a Table component from the React-Bootstrap library https ......
Read more >
Making the Bottom Sheet Modal using React Native - Medium
For this, we can create a View component that wraps around the animated container. The view will be made to respond to two...
Read more >
5 Examples of the new Ionic 6 Bottom Sheet Modal
Get the details on how to use the brand new Ionic Bottom Sheet component in this guest blog post from Simon Grimm.
Read more >
A Performant Interactive Bottom Sheet with Fully Configurable ...
Modal presentation view, Bottom Sheet Modal. Smooth interactions & snapping animations. Support FlatList , SectionList , ScrollView & View scrolling ...
Read more >
Scrollables | React Native Bottom Sheet - GitHub Pages
Bottom Sheet Modal. This is documentation for React Native Bottom Sheet v2 (Reanimated v1), which is no longer actively maintained.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found