I created a list with the ability to delete lines by the method: .onDelete (perform:).
List { ForEach(itemList.dataLocation) { item in NavigationLink(destination: ListDetails(name: item.nameDB)) { ListItem(name: item.nameDB) } } .onDelete(perform: delete) .onMove(perform: move) } func delete(at offsets: IndexSet) { itemList.dataLocation.remove(atOffsets: offsets) session.deleteData(id: //id row) //this problem } How to pass the value of a deleted string to a function? It is advisable to still get data from this row. Thanks in advance!