When selecting an option in Picker declared in Menu in toolbar with this code:
struct ContentView: View {
@State private var option: Int = 0
var body: some View {
NavigationStack {
Text("Hello, World")
.toolbar {
ToolbarItem {
Menu {
Picker("", selection: $option) {
Text("Option 0").tag(0)
Text("Option 1").tag(1)
}
} label: {
Image(systemName: "star")
}
}
}
}
}
}
there is no visible change in selecton (checkmark is on the initial option). But the actual change happens - 'option' variable changes.
In Xcode 13.4.1 / iOS 15.5 the same code works well (for NavigationView of course).
I think this is certainly a bug.