title: SwiftUI 2 - How to prevent the top section from closing in a list in macOS and iPadOS
body: <p>In a SwiftUI 2 navigation bar I have a list with multiple sections. All sections have a header, however I want the top section to never be closed and the elements will never be hidden. This is ask for only the first header and also want that the disclosure indicator / collapsing symbol to be gone or hidden.</p>
  <p><em>Can this be done in SwiftUI 2?</em>
  I want to have this to work in macOS and iPadOS.</p>
  <pre><code>@State var agendaViews: [String] = [&quot;Agenda&quot;, &quot;Client&quot;, &quot;Next Client&quot;]
  @State var treatmentViews: [String] = [&quot;Treatment&quot;, &quot;Products&quot;, &quot;Merchandising&quot;]
  @State var selectionAgenda: String?
  
  var body: some View {
      NavigationView {
          VStack {
              List(selection: $selectionAgenda) {
                  Section(header: ListHeader()) {    // &lt;&lt;&lt;&lt;&lt;&lt;&lt; For this section no Close Icon and No way to close this section.
                      ForEach(agendaViews, id: \.self) { string in
                          NavigationLink(destination: DetailsView(test: string)) {
                              Text(string)
                          }
                      }
                  }
                  Section(header: ListHeader2(), footer: ListFooter2()) {
                      ForEach(treatmentViews, id: \.self) { string in
                          NavigationLink(destination: DetailsView2(test: string)) {
                              Text(string)
                          }
                      }
                  }
              }.listStyle(SidebarListStyle())
      }
    }
  }
  
  struct ListHeader1: View {
    var body: some View {
        HStack {
          Image(systemName: &quot;calendar&quot;)
          Text(&quot;Agenda&quot;)
        }
      }
    }
    struct ListHeader2: View {
    var body: some View {
       HStack {
          Image(systemName: &quot;person.3&quot;)
          Text(&quot;Clienten&quot;)
       }
      }
     }
  
     struct ListFooter3: View {
       var body: some View {
         Text(&quot;===&quot;)
       }
     }
  </code></pre>
  <p>I hope my question is clear.
  As always thank you very much.</p>
  <p>Some image added to show that a section header has a close and open button.</p>
  <p><a href="https://i.stack.imgur.com/kjCjC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kjCjC.png" alt="Open &amp; Close" /></a></p>