I want to delete a row from keydata if a user uses the .contextMenu { }, here "Hello World löschen".
@State private var keyData = [
ListView("1", "Hello", "World"),
ListView("2", "Bye", "Wold")
]
ForEach($keyData) { $i in
NavigationLink()) {
//
}
.contextMenu {
Button { } // ?
label: {
Text(i.firstName) +
Text(" ") +
Text(i.lastName) +
Text(" löschen")
}
}
}
