Use value from Picker to populate list

108 views Asked by At

Can I use value from Picker to populate List in SwiftUI

VStack{
    Picker(selection: $selected) {
        ForEach(0..<vm.cars.count, id: \.self){
            Text(vm.cars[$0].make).tag($0)
        }
    }
    List{
        // Populate list with **vm.cars[$0].make** with car models 
    }
}
0

There are 0 answers