I am dabbling with the NavigationSplitView
introduced this year.
I have a funny behaviour when I use a list with several sections in the side panel, where the sections have footers: those footers are not displayed at all, but only when used in the side panel.
Here's my List in a separate view:
struct SampleListWithSections: View {
var body: some View {
List {
Section {
Text("Cell")
} header: {
Text("Header")
} footer: {
Text("Footer")
}
Section {
Text("Cell2")
} header: {
Text("Header2")
} footer: {
Text("Footer2")
}
}
}
}
When I use this view as the root view, everything works as expected …
@main
struct poc_Navigation2App: App {
@StateObject private var appModel = AppModel.mock
var body: some Scene {
WindowGroup {
SampleListWithSections()
}
}
}
But when I use my List view within NavigationSplitView
like so …
@main
struct poc_Navigation2App: App {
@StateObject private var appModel = AppModel.mock
var body: some Scene {
WindowGroup {
NavigationSplitView {
SampleListWithSections()
} detail: {
Text("Unimplemented Detail View")
}
}
}
}
Am I "holding it wrong" or is this a bug? If the latter, is it a known bug?