Skip to content

Commit 7e41738

Browse files
committed
Add @ViewBuilder to header parameter in initializer
The header parameter in the CustomSection initializer now uses the @ViewBuilder attribute, ensuring correct view composition when Footer is EmptyView.
1 parent 9f69016 commit 7e41738

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/CustomSection/CustomSection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public struct CustomSection<Header: View, Footer: View, Content: View>: View {
2626
self.init(content: content, header: { EmptyView() }, footer: { EmptyView() })
2727
}
2828

29-
public init(@ViewBuilder content: () -> Content, header: () -> Header)
29+
public init(@ViewBuilder content: () -> Content, @ViewBuilder header: () -> Header)
3030
where Footer == EmptyView {
3131
self.init(content: content, header: header, footer: { EmptyView() })
3232
}

0 commit comments

Comments
 (0)