Ruuning Xcode 13 iOS 14.4 iPhone 12 Pro Max simulator, this warning was given when expanding the list section.
Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a table view cell's content view. We're considering the collapse unintentional and using standard height instead. Cell: <SwiftUI.ListCoreCellHost: 0x7f9d5d060200; baseClass = UITableViewCell; frame = (0 81; 388 88.9757); clipsToBounds = YES; autoresize = W; layer = <CALayer: 0x600003d8d8a0>>
Which is the same type of error you get if you add another Text
line Text("Other text')
to your code.
VStack {
Text("TextView")
DatePicker(selection: $selectedDate, displayedComponents: .date) {
Text("DatePicker")
}
Text("Other text")
}
Adding extra text line is not a solution to your problem, maybe a workaround at best, however the text and DatePicker do appear to now work again. (iOS 15.0 iPhone 12 Max Pro).
More usual is you then take this modified code and build for the iPad. Your observed issue return.
I think it is worth raising feedback to Apple, as it might be a bug in the simulators / Xcode in how it handles sidebar, main and detailed views together.