Support auto-resizing when scrollable enabled
#714
Replies: 4 comments 2 replies
-
|
This will be supported on future version of TrueSheet. This is currently a limitation on RN Fabric itself, they've introduced support for this but it's not yet stable. |
Beta Was this translation helpful? Give feedback.
-
|
Wanted to surface this, its a very important feature for so many use cases. I use scrollview all the time with This leaves me with either doing a fixed detent e.g. 0.5 or not use scrollview at all. If anyone has a recipe making this work with the current version of TrueSheet, please share. Can you go into detail @lodev09 what the fabric limitations are here? I may give it a go. |
Beta Was this translation helpful? Give feedback.
-
|
Dynamic sizing is the only missing feature that stopping us from migrating to the library from Gorhom bottom-sheet |
Beta Was this translation helpful? Give feedback.
-
|
I’m using this workaround for auto-height + scrollable content: const maxHeight = useWindowDimensions().height * 0.65
<TrueSheet ref={sheet} detents={['auto']}>
<ScrollView style={{ maxHeight }} nestedScrollEnabled>
{/* content */}
</ScrollView>
</TrueSheet>This gives me the UX I want:
It seems to work on our side, and we haven’t run into issues yet. But it bypasses the documented Would this be safe enough to mention as a temporary workaround in the docs, or are there known problems with this approach that I’m missing? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, auto-resizing is not supported as long as
scrollableis enabled.When
scrollableis enabled, the default detent is set to1, even when the content is smaller.This prevents us from using this library because the height of the content in our bottom sheets varies.
It would be great if auto-resizing were supported for scrollable content too (e.g. when the scrollable content is only half the screen height).
Beta Was this translation helpful? Give feedback.
All reactions