fix first sheet height change not registering (#8267)

This commit is contained in:
Samuel Newman
2025-04-22 21:49:20 +03:00
committed by GitHub
parent dba0bd8379
commit b1550f9c02
3 changed files with 11 additions and 7 deletions
+2 -1
View File
@@ -144,7 +144,8 @@ class SheetView: ExpoView, UISheetPresentationControllerDelegate {
}
func updateLayout() {
if self.prevLayoutDetentIdentifier == self.selectedDetentIdentifier,
// Allow updates either when identifiers match OR when prevLayoutDetentIdentifier is nil (first real content update)
if (self.prevLayoutDetentIdentifier == self.selectedDetentIdentifier || self.prevLayoutDetentIdentifier == nil),
let contentHeight = self.innerView?.subviews.first?.frame.size.height {
self.sheetVc?.updateDetents(contentHeight: self.clampHeight(contentHeight),
preventExpansion: self.preventExpansion)