I was wondering, is there a way to get the result of a filter
when there are no results?
At the moment, as a work around I have a ZStack and overlaying the results on top of a "No results"
message.
But I was wondering if there was a conditional from the filter?
if(array.count > 0) {
ForEach(array.filter({...}) { item in
// do things if found
// <-- check if no results here
}
} else {
Text("No results at all")
}
I know that goes against the idea of the filtering, but thought I'd check in case I've missed something in all my searches!