Hi,
I am trying to implement a list view that supports reordering of items via onMove
and at the same time drag operations that are accepted in other views.
Example (pseudo code):
List(..) {
ForEach(viewModels) { viewModel in
RowView(viewModel)
.draggable(viewModel.transferableType) // transferableType implements the Tranferable protocol
}
.onMove(perform: myMoveHandler)
}
In this case the draggable/dropDestination part works perfectly, but onMove
is not called anymore. If draggable
is commented out onMove
starts working again. I guess this is some kind of gesture priority conflict but there is no way here to combine them both in a simultaneousGesture..
modifier.
How can I enable both, reordering of lists AND transferable representations of data?
Best Heiko
P.S.: same problem when using the older onDrag
modifier.