To enable rearranging items in my List, I added an EditButton() and attached the onMove modifier. Here's my code:
struct ContentView: View {
@State var names = ["Adam", "Bob", "Cole", "Dad", "Ella"]
var body: some View {
NavigationView {
List {
ForEach(names, id: \.self) { name in
Text(name)
}
.onMove { names.move(fromOffsets: $0, toOffset: $1) }
}
.toolbar { EditButton() }
}
}
}
Once I press the "Edit" button, I can reorder the items. However, a huge space appears on the left side of each row.
How do I get rid this space?
I suspect that it's placeholder space for a delete button, but I don't need a delete button.

