Replies: 1 comment
-
|
Please try putting the ForEach inside a container - e.g. a VStack - and put the onAppear modifier on the container. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For example,
@State private var mcOptions: [String] = []
ForEach(mcOptions, id: .self) { option in ..... }
.onAppear {
mcOptions = [ ..... ]
}
In this case, for iOS, there is no problem. But in android, it shows nothing.
I checked the documentation. It said Compose needs element is identifiable.
Is it the cause of problem ?
All my object is just simple array of string.
Any solution ?
Beta Was this translation helpful? Give feedback.
All reactions