When using a List which I want to be in edit mode, but do NOT want to use "onDelete" (only want to use "onMove") there is an indentation occuring for the row (a bug I think). See below for example. Any work arounds until this is fixed/addressed?
Snapshot Image
https://i.stack.imgur.com/UAIIN.png
Playground Code
import SwiftUI
import PlaygroundSupport
let modelData: [String] = ["Eggs", "Milk", "Bread"]
struct ListTestNoDelete: View {
private func move(from uiStartIndexSet: IndexSet, to uiDestIndex: Int) {
print("On Move")
}
var body: some View {
NavigationView {
VStack {
List {
ForEach(modelData, id: \.self) { str in
HStack {
Image(systemName: "square")
Text(str)
}
}
.onMove(perform: self.move)
}
.environment(\.editMode, .constant(.active))
.navigationBarTitle( Text("Test") )
}
}
}
}
let listTest = ListTestNoDelete()
PlaygroundPage.current.liveView = UIHostingController(rootView: listTest)