osdnk / react-native-reanimated-bottom-sheet

Highly configurable bottom sheet component made with react-native-reanimated and react-native-gesture-handler
MIT License
3.32k stars 328 forks source link

Current snap point without animated elements #226

Open kierangillen opened 4 years ago

kierangillen commented 4 years ago

Hi,

I'm looking for a solution of getting the current snap point. All of the examples I can find in other issues refer to using the callbackNode and an onChange event in an animated code block updating the index.

E.g.

<Animated.Code
  exec={onChange(
    this.drawerCallbackNode,
    call([this.drawerCallbackNode], this.onCallback))}
/>

Is it possible to get the current snap index if I'm not using any animated elements? My BottomSheet simply has a single FlatList child.

tizzle commented 3 years ago

I'm interested in this as well.

chengsokdara commented 3 years ago

A must have feature.

abrahamjsb commented 3 years ago

I need it too...

RohovDmytro commented 3 years ago

Would love to see this option. Or maybe some clear documentation how to calculate current snap index with callbackNode.