Skip to content

Commit

Permalink
Upated the code to use stores.indicies for dynamic ranges in ForEach
Browse files Browse the repository at this point in the history
  • Loading branch information
Crebs committed Dec 4, 2024
1 parent b8ecffc commit 403f862
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ struct KeyValueEncryptedFileStoreInspector: View {
VStack(alignment: .leading) {
Form {
Picker(selection: $selectedIndex, label: Text("Store")) {
ForEach(0 ..< stores.count) {
Text(self.stores[$0])
ForEach(stores.indices, id: \.self) { index in
Text(self.stores[index])
}
}
HStack {
Expand Down

0 comments on commit 403f862

Please sign in to comment.