   public func previewInteraction(_ previewInteraction: UIPreviewInteraction, didUpdateCommitTransition transitionProgress: CGFloat, ended: Bool) {
     guard ended else { return }
     guard let path = expandedIndexPath else { return }
+    panGestureRecognizer.isEnabled = false
     if shouldCommitPreviewAction {
       openDetailView(for: path)
     } else {

  public func previewInteractionDidCancel(_ previewInteraction: UIPreviewInteraction) {
    collapseCells()
    
    // This trick will prevent expanding cell in `didSelectRowAt indexPath` method
    tableView.allowsSelection = false
    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) {

  
  public func previewInteraction(_ previewInteraction: UIPreviewInteraction, didUpdatePreviewTransition transitionProgress: CGFloat, ended: Bool) {
    guard ended else { return }
    panGestureRecognizer.isEnabled = false
    let location = previewInteraction.location(in: tableView)
    guard let path = tableView.indexPathForRow(at: location) else { return }
    if path == expandedIndexPath {
