How do I filter a list using a search bar in SwiftUI.
This is what I have done so far, it shows all the information in the list but the list does not filter the information.
ForEach(
(0..<self.appData.myJobs.count).filter(
{ "\($0)".contains(searchBar.text) || searchBar.text.isEmpty }),
id: \.self) { index in
Thanks.
Now you try to filter indices (like 1, 2, 3...), but I assume you try to filter by some texts, so it should be something like (I don't now your Job properties, so it is just assumption, but idea should be clear)