Sheet not resizing in certain cases
When I'm using snapPoints={({ minHeight, maxHeight }) => [minHeight, maxHeight]}, everything works fine : the bottom sheet is resized.
But in my case, I want my BottomSheet to be always open, but very small (30px), and when it's sliding to minHeight, sometimes I need the BottomSheet to fit the content, but the BottomSheet is failing to resize.
snapPoints={({ minHeight, maxHeight }) => [30, minHeight, maxHeight]}
I kind of understand why this is needed, but is there a solution ?
Ok this is a bug, it manages to correct the snap position if a drag interaction is done, but for some reason it's failing if the content changes when idle.
Here's a workaround until there's a fix: https://codesandbox.io/s/reproducing-issue-react-spring-bottom-sheet-33-forked-rudje?file=/src/App.js
In any case your use case should "just work" without any need to use the ref.snapTo API or other workarounds.
Awesome thank you :)