I have declared two separated lists of items within a List/ForEach as the following:
List {
ForEach(model) { item in
ItemView(item)
.tag(item.id)
}
.onMove(perform: { rows, newIndex in
model.move(items: rows, destination: newIndex)
})
}
Both lists use a different model, identified by its IDs. Nevertheless, on macOS, I have realized that I can drag items from one list to the other list, despite their different IDs.
Is there any possibility to disable the drop functionality (e.g. via .onInsert()) of the other list while dragging? I have already a functionality implemented using NSItemProviderReading and NSItemProviderWriting to be able to detect when the user has started dragging.