Skip to content

Section headers only render their first element #311

@dfabulich

Description

@dfabulich

In https://github.com/skiptools/skipapp-showcase/blob/main/Sources/Showcase/GridPlayground.swift

private struct LazyVGridSectionedView: View {
    var body: some View {
        ScrollView {
            LazyVGrid(columns: [GridItem(.adaptive(minimum: 80))]) {
                ForEach(0..<5) { index in
                    Section {
                        VGridCellsView(start: index * 100, count: 10, color: .yellow)
                    } header: {
                        Text("Section \(index) Header")
                    } footer: {
                        Text("Section footer")
                    }
                    .border(.orange)
                }
            }
        }
    }
}

Copy and paste Text("Section \(index) Header"), so there are two Text views in the header.

Expected: You should see both views, aligned vertically. (In LazyHGrid, they should be aligned horizontally.)

Actual: Only the first Text view renders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appearanceInconsistencies between the expected appearance of components in Jetpack Compose vs. SwiftUIbugSomething isn't workingcomposeLimitation of Jetpack Compose or issue with SwiftUI translationlayoutSwiftUI/Jetpack Compose layout issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions