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
You need to use Group to wrap different views provided by condition, like below
Group
ForEach(self.documentItems, id: \.self) { document in Group { if (self.checkSearchString(document: document)) { HStack(spacing: 0) { ListRow(document: document).tag(document) } } else { EmptyView() } } }