I found a workaround that might work for you: Define EditMode state and provide it to List and EditButton directly. See this example:
@State
private var editMode: EditMode = .inactive
List {
...
}
.environment(\.editMode, $editMode)
.toolbar {
ToolbarItem(placement: .primaryAction) {
EditButton().environment(\.editMode, $editMode).navigationTitle("Tags")
}
if editMode.isEditing {
ToolbarItemGroup(placement: .status) {
Button("Merge") {}.disabled(multiSelection.count < 2)
}
}
}
Hope this helps.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: