Solved this. In the primary navigationView, you have to include a placeholder view for the detail view. See below for an example. Without the Text("Select a link...") view, the problem occurs.
struct ContentView: View {
		var body: some View {
				NavigationView {
						List {
								ForEach(1 ... 10, id: \.self) { index in
										NavigationLink(destination:
																		Text("\(index)")
																		 .frame(maxWidth: .infinity, maxHeight: .infinity)
										) {
												Text("Link \(index)")
										}
								}
						}
						.listStyle(SidebarListStyle())
						Text("Select a link...")
								.frame(maxWidth: .infinity, maxHeight: .infinity)
				}
				.frame(maxWidth: .infinity, maxHeight: .infinity)
		}
}
Post
Replies
Boosts
Views
Activity
I have the same on an Intel MacBook so it isn't just a DTK issue.
Big Sur beta 8, Xcode 12.2
Filing a feedback.
I found that I could open the project in Xcode 12.0.1, add the package dependency and then go back to 12.2.
Seems to work fine but hopefully 12.2 will be fixed soon.
Thank you. The tip to create a scheme with "Debug executable" turned off in the Run settings is working for me.
No ideal but at least I can run my apps now.
I ran into this too, but managed to find a solution.
The updateNSView method. was getting called very frequently and so reloading the table which lost the section.
I made this function check if its data had changed before reloading and that worked.
I had passed the data to the Coordinator for use in the data source & delegate, so this code worked for me:
func updateNSView(_ nsView: NSTableView, context: Context) {
if tableData != context.coordinator.tableData {
context.coordinator.tableData = tableData
nsView.reloadData()
}
}
The elements in my data array were already Equatable, so this works fine.