Type mismatch when working with ForEach with generics
Am I doing something wrong here or
You may have to replace some generics or generic constraints with looser typing in order to transpile successfully. applies here?
I think it is not that complex so I hope that I just should rephrase that somehow. I tried several approaches but I can't make this work.
Any advice?
I'm so sorry that we did not see this! I'll investigate right away and give you an update
I'll need more time to consider a proper fix, but here is a workaround for you: constrain T to be both Hashable and Any. E.g.:
struct CustomDropdownOption<T> where T: Hashable, T: Any {
...
}
struct CustomDropDown<T>: View where T: Hashable, T: Any {
...
}
I'll let you know when we have a full fix in place. And again, very sorry for the delay! We appreciate the report, and please let us know if you run into additional problems or have any additional feedback.
If you update to the latest SkipUI with File->Packages->Update to Latest in Xcode, you can remove the above workaround and go back to your original code
Thank you very, it works indeed :)