You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
snapToPosition method is opening bottomsheet in maximum screen height and snapToIndex is not working when used in useEffect
Environment info
Library
Version
@gorhom/bottom-sheet
^4
react-native
0.70.5
react-native-reanimated
2.13.0
react-native-gesture-handler
2.6.1
Steps To Reproduce
create react native app
use bottomsheet from library
use snapToIndex and snapToPosition inside useeffect or useLayoutEffect
Describe what you expected to happen:
open bottomsheet with correct index provided
open bottomsheet with correct prosition provided
Reproducible sample code
constsnapPoints=React.useMemo(()=>['10%','25%','45%','65%','95%'],[],);React.useEffect(()=>{sheetRef.current?.snapToPosition(400);// this opens bottomsheet to maximum screen height// or this // sheetRef.current?.snapToIndex(3); // this is not working at all},[sheetRef.current,loaded]);
The text was updated successfully, but these errors were encountered:
Bug
snapToPosition method is opening bottomsheet in maximum screen height and snapToIndex is not working when used in useEffect
Environment info
Steps To Reproduce
Describe what you expected to happen:
Reproducible sample code
The text was updated successfully, but these errors were encountered: