You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose we have an array of SearchObject, and user can enter search query into text property.
classSearchObject:ObservableObject{letname:Stringletsearch:(String)->[Country]vartext:String=""init(name:String, search:@escaping(String)->[Country]){self.name = name
self.search = search
}}
Although SearchObject is class, when we use ForEach, the changes to passed object won't be reflected in our array and there is no reload trigger, we need to point to object in array directly, like
Suppose we have an array of
SearchObject
, and user can enter search query intotext
property.Although
SearchObject
is class, when we useForEach
, the changes to passed object won't be reflected in our array and there is no reload trigger, we need to point to object in array directly, likeThe text was updated successfully, but these errors were encountered: