[Getting Started] Selecting default navLink on startup.

So, I've got a SwiftUI app with a triple column splitView.

When the app starts on an 11 inch iPad, the "primary" column is offscreen.

The primaryColumn has a List full of navigationLinks.

Like so:

List {
   ForEach(items, id: \.itemID) { item in
        NavigationLink(tag: item, selection: $selectedItem) {
              ItemDetailsView(item: item)
...

Now, the selection of the first Column in the split view cascades through the rest of the app, so populating it is pretty important.

I've tried having the selectedItem be set from an EnvironmentObject. I've also tried having it set in onAppear.

Everything I try only causes a selection the "pop into place" whenever I expose the primary column of the sidebar.

Am I going about this the wrong way?

Is it because the sidebar is hidden by default?

This doesn't seem resolved in beta 3 either... Fruta has the same "bug" too.

FB9330740

[Getting Started] Selecting default navLink on startup.
 
 
Q