I would like to use a context menu item to navigate into a different view.
.contextMenu {
Button {
// Navigate to a view
} label: {
Label("Add to playlist", systemImage: "music.note.list")
}
}
There are multiple items in the context menu. I have tried to wrap the button into a NavigationLink but there is no response when selecting the context menu item.