I've noticed that this problem occurs as soon as selectedId gets set a value, then persists even if I remove the selection.
This modified example shows that as long as the selected id does not get set, everything works as expected. When you select tap "Option", the selection is set, and my problem occurs as shown in the video above.
Even if I remove the selection by tapping "Unselect", the problem still persists.
@State var selectedId: String? = nil
NavigationSplitView {
List(selection: $selectedId) {
NavigationLink("Sidebar", value: "test")
Button("Unselect") {
selectedId = nil
}
}
} detail: {
Text("Detail")
.toolbar {
Button("Button") {}
}
}