SwiftUI picker driven by an enum: value not updated

Hello,

According to Apple's documentation regarding Picker in SwiftUI using an Enum, if the enum conforms to the Identifiable protocol in addition to CaseIterable, a picker iterating over all cases should update the bound variable natively.

I tested it, and it does not work as expected.
However, if I pass a tag for each view, it works.

See my Stack Overflow question for screenshots

What's happening here? Is the Apple documentation wrong? The selectedFlavor variable expects a value of type Flavor, but the id used in the picker is actually a String.

Thanks.
SwiftUI picker driven by an enum: value not updated
 
 
Q