Skip to content

Commit

Permalink
No longer with Identifiable constraint on Element for onDelete
Browse files Browse the repository at this point in the history
  • Loading branch information
Reed Es committed Mar 4, 2022
1 parent 89ce301 commit e3e7169
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/DetailerConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public struct DetailerConfig<Element>

public typealias CanDelete = (Element) -> Bool
public typealias CanEdit = (Element) -> Bool
public typealias OnDelete = (Element.ID) -> Void
public typealias OnDelete = (Element) -> Void
public typealias OnValidate = (Context, Element) -> [String]
public typealias OnCancel = (Context, Element) -> Void
public typealias OnSave = (Context, Element) -> Void
Expand Down
2 changes: 1 addition & 1 deletion Sources/Internal/EditDetailBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ where Element: Identifiable,

private func deleteAction() {
guard let _onDelete = config.onDelete else { return }
_onDelete(element.id)
_onDelete(element)
dismissAction()
}

Expand Down

0 comments on commit e3e7169

Please sign in to comment.