File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ public struct EditDetailerContextMenu<Element>: ViewModifier
52
52
content
53
53
. contextMenu {
54
54
DetailerEditButton ( element: element, canEdit: config. canEdit) { toEdit = $0 }
55
+
56
+ // NOTE if no delete handler, hide menu item entirely
55
57
if isDeleteAvailable {
56
58
Divider ( )
57
59
DetailerDeleteButton ( element: element, canDelete: config. canDelete, onDelete: config. onDelete)
Original file line number Diff line number Diff line change @@ -56,11 +56,10 @@ public struct EditDetailerSwipeMenu<Element>: ViewModifier
56
56
. tint ( . accentColor)
57
57
}
58
58
. swipeActions ( edge: . trailing, allowsFullSwipe: true ) {
59
+ // NOTE if no delete handler, hide menu item entirely
59
60
if isDeleteAvailable {
60
61
DetailerDeleteButton ( element: element, canDelete: config. canDelete, onDelete: config. onDelete)
61
62
. tint ( . red)
62
- } else {
63
- EmptyView ( )
64
63
}
65
64
}
66
65
}
You can’t perform that action at this time.
0 commit comments