SwiftUI-Flow icon indicating copy to clipboard operation
SwiftUI-Flow copied to clipboard

Incorrect bounds on VFlow if using .frame(maxHeight:)

Open thedruid opened this issue 1 year ago • 1 comments

If using maxHeight instead of height on a VFlow in a ScrollView, the bounds is incorrect and the view is cut off.

    ScrollView {
        VFlow {
            ForEach(1...21, id: \.self) {
                Text("Item \($0)")
                    .padding(4)
                    .background(.orange)
            }
        }
        .frame(maxHeight: 300) 
        .padding(16)
    }

.frame(maxHeight: 300) Screenshot 2024-08-14 at 14 38 22

.frame(height: 300)`: Screenshot 2024-08-14 at 14 38 32

thedruid avatar Aug 14 '24 12:08 thedruid