SwiftUI Navigation link doesn't work when filtering ForEach
The provided code is not testable, but by reading assume the reason of issue is in equal navigation links, try the following (that will result in updating links on filtering)
ZStack {
DeckRow(deck: deck)
NavigationLink(destination: DeckView()) {
EmptyView()
}.id(deck) // << here !!
}
or, as it would be expected, make that DeckView
dependent on deck
, like DeckView(model: deck)
, which also make each navigation link unique and refreshable on filter.