I am building a List based on my elements in an array I fetched before.
I am fetching all the entities.. when the user makes a search in the search bar, I want to fi
List(selection: $selectedDocument)
{
ForEach(self.documentItems, id: \.self) { document in
self.checkSearchString(document: document) ? extractedHstack() : emptyView()
}
Extract your hstack and use a trinary with an empty view. Let me know if this works I did this from memory no IDE on this computer.