Skip to content

Commit ee9df81

Browse files
authored
Moved optional menus to SwiftDetailerMenu #8 (#10)
1 parent 3472d52 commit ee9df81

9 files changed

+5
-416
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ It shows _Detailer_ used with `LazyVGrid` and `Table` containers.
160160

161161
## Menuing
162162

163+
See [SwiftDetailerMenu](https://github.com/openalloc/SwiftDetailerMenu) for optional menu support.
164+
163165
The use of context menus for macOS and iOS:
164166

165167
macOS | iOS
@@ -216,6 +218,7 @@ If this validation is used, the user will not be able to save changes until it r
216218

217219
## See Also
218220

221+
* [SwiftDetailerMenu](https://github.com/openalloc/SwiftDetailerMenu) - optional menu support for _SwiftDetailer_
219222
* [DetailerDemo](https://github.com/openalloc/DetailerDemo) - the demonstration app for this library
220223
* [TablerCoreDemo](https://github.com/openalloc/TablerCoreDemo) - the demonstration app for this library, for Core Data sources
221224

Sources/DetailerConfig.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public struct DetailerConfig<Element>
5252
// MARK: Parameters
5353

5454
public let minWidth: CGFloat
55-
public let canEdit: CanEdit?
55+
public let canEdit: CanEdit
5656
public let canDelete: CanDelete
5757
public let onDelete: OnDelete?
5858
public let onValidate: OnValidate
@@ -62,7 +62,7 @@ public struct DetailerConfig<Element>
6262
public let validateIndicator: ValidateIndicator
6363

6464
public init(minWidth: CGFloat = DetailerConfigDefaults.minWidth,
65-
canEdit: CanEdit? = nil,
65+
canEdit: @escaping CanEdit = { _ in true },
6666
canDelete: @escaping CanDelete = { _ in true },
6767
onDelete: OnDelete? = nil,
6868
onValidate: @escaping OnValidate = { _, _ in [] },

Sources/Menus/DetailerDeleteButton.swift

-71
This file was deleted.

Sources/Menus/DetailerEditButton.swift

-71
This file was deleted.

Sources/Menus/DetailerViewButton.swift

-61
This file was deleted.

Sources/Menus/EditDetailerContextMenu.swift

-63
This file was deleted.

Sources/Menus/EditDetailerSwipeMenu.swift

-66
This file was deleted.

0 commit comments

Comments
 (0)