FormSheet fitToContents doesn't work on iOS - Opens full screen #2665
Labels
Platform: Android
This issue is specific to Android
Platform: iOS
This issue is specific to iOS
Repro provided
A reproduction with a snack or repo is provided
Description
Very excited to see formSheets!
When using formSheet screens and applying the
fitToContents
options onsheetAllowedDetents
it only ever opens a full modal screen on iOS, similar to if I was to applysheetAllowedDetents: [1]
. Android appears to work as expected here.I see issue #2521 mentions the example app and the fix you applied is to remove the
flex: 1
style from the screen but that doesn't seem to help.Also, something that would be very helpful would be the option to apply
[-1, 0.5, 1]
tosheetAllowedDetents
to first use the content height, then allow it to expand to a full screen sheet. I'll raise a feature request separately for that though.Steps to reproduce
sheetAllowedDetents: "fitToContents"
to screen options3.1. Opens at the correct height
4.1. Opens as a full screen modal
See Stack link below for details
Snack or a link to a repository
https://snack.expo.dev/@eli-nathan/formsheet
Screens version
4.6.0
React Native version
0.77.0
Platforms
iOS, Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
iPhone 15
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: