How to snap sheet custome while on event listeners #294
-
How does snap sheet custom I have set snap points and paas ref but I want to change the snap mode to whatever I am returning in the snap points prop. it is an array as we know so I want to trigger a specific snap position or points on event listening. there is a method in in ref.current snapTo it takes two parameters and it works but it snaps only the last snap point. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I got this answere by reading docs. setting maxHeight*0.65 it means 65 vh height |
Beta Was this translation helpful? Give feedback.
I got this answere by reading docs.
if (ref.current) { ref.current.snapTo(({ maxHeight }) => maxHeight * 0.65); }
setting maxHeight*0.65 it means 65 vh height