I have a swiftUI listView. Each row includes details about a model object, and a button to perform a specific action in the row.
Unfortunately when I tap the button it performs the push to the navigation destination.
Is there some way I can prevent/disable this unwanted push?
thanks,
Mike
Code Block struct EpisodeRowView: View { @ObservedObject var episode: Episode var body: some View { HStack { if shouldShowRightButton() { Button(action: { self.handleRightButtonTap() }) { rightButtonImage() } .padding(.horizontal) } NavigationLink(destination: EpisodeDetailView(episode: episode)) { Text(episode.title) } } }
Unfortunately when I tap the button it performs the push to the navigation destination.
Is there some way I can prevent/disable this unwanted push?
thanks,
Mike