title: SwiftUI, List, .onDelete(perform: ) and Firestore
body: <p>I created a list with the ability to delete lines by the method: .onDelete (perform:).</p>
  
  <pre><code>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
  }
  </code></pre>
  
  <p>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!</p>