Skip to content

Commit e3e7169

Browse files
author
Reed Es
committed
No longer with Identifiable constraint on Element for onDelete
1 parent 89ce301 commit e3e7169

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/DetailerConfig.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public struct DetailerConfig<Element>
4242

4343
public typealias CanDelete = (Element) -> Bool
4444
public typealias CanEdit = (Element) -> Bool
45-
public typealias OnDelete = (Element.ID) -> Void
45+
public typealias OnDelete = (Element) -> Void
4646
public typealias OnValidate = (Context, Element) -> [String]
4747
public typealias OnCancel = (Context, Element) -> Void
4848
public typealias OnSave = (Context, Element) -> Void

Sources/Internal/EditDetailBase.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ where Element: Identifiable,
155155

156156
private func deleteAction() {
157157
guard let _onDelete = config.onDelete else { return }
158-
_onDelete(element.id)
158+
_onDelete(element)
159159
dismissAction()
160160
}
161161

0 commit comments

Comments
 (0)