SwiftUI list rown and buttons in same section in edit mode do not allow actions
Goal Would like to have clickable buttons in list and section, movable and deletable rows in list
code:
Section(header: Text("HEADER")) {
List {
ForEach(dataList) { data in
Button {
// action will not be called
print("action will not be called")
} label: {
Text("Button in list")
} // Button
} // ForEach
.onMove(perform: onMove)
} // List
Button {
// action will not be called
print("action will not be called")
} label: {
Text("Button in section")
}
} // Section
// .environment(\.editMode, .constant(.active))