diff --git a/components/PlatformDropdown.tsx b/components/PlatformDropdown.tsx index b9c006a6c..d7d02d274 100644 --- a/components/PlatformDropdown.tsx +++ b/components/PlatformDropdown.tsx @@ -262,24 +262,28 @@ const PlatformDropdownComponent = ({ }, [isVisible, controlledOpen, controlledOnOpenChange]); if (Platform.OS === "ios") { + // Pin the wrapper to the measured trigger size. @expo/ui's (SDK 55) + // fills its parent and reports its own size via setStyleSize, so it can't + // size itself to content. If the wrapper has no size, the Host's `flex: 1` + // height depends on the parent while the parent depends on the Host — a + // circular dependency that collapses to 0 for any selector nested more than + // one level deep (so only the first, shallowest dropdown stays visible). + // Giving the wrapper the measured size breaks the cycle; the Host then + // fills a concrete box. return ( - - {/* Hidden measurer: lays the trigger out normally to capture its - intrinsic size, which we then pin onto the Host below. */} - - - {trigger} - - - + {/* Hidden measurer: lays the trigger out off-flow to capture its + intrinsic size. Absolutely positioned WITHOUT right/bottom so it + sizes to the trigger's content rather than to its parent. */} + + {trigger} + + {groups.flatMap((group, groupIndex) => { // Check if this group has radio options