How to disable folding sidebar

You can now hide the sidebar button, but how to prevent the sidebar from closing (like the settings app, or the Music app...)

import Foundation

import SwiftUI


struct ContentView:: View {
    @State private var columnVisibility = NavigationSplitViewVisibility.detailOnly
    var body: some View {
        NavigationSplitView(columnVisibility: $columnVisibility) {
            List {
               Text("dd")
            }
            .toolbar(removing: .sidebarToggle)
        } detail: {
            VStack{
                Button("Expand"){
                    columnVisibility = .all
                }
            }
            .toolbar{
                ToolbarItem{
                    Button(action:{
                    }){
                        Image(systemName: "square.and.arrow.up")
                    }
                }
            }
        }
    }
}

.constant(.all) was also not possible

import Foundation

import SwiftUI


struct ContentView: View {
    var body: some View {
       NavigationSplitView(columnVisibility: .constant(.all)) {
            List {
               Text("dd")
            }
            .toolbar(removing: .sidebarToggle)
        } detail: {
            VStack{
                 Text("dd")
            }
            .toolbar{
                ToolbarItem{
                    Button(action:{
                    }){
                        Image(systemName: "square.and.arrow.up")
                    }
                }
            }
        }
    }
}

Any solution? I'm facing same issue...

Don't use NavigationSplitView, use HSplitView.

Example: https://gist.github.com/hrvoje0099/97d6a2fd050d98afcdf140dcbed04f7b

How to disable folding sidebar
 
 
Q