You must preventDefault() behavior of the dragover event like this:
onDragOver = (e) => {
let event = e as Event;
event.stopPropagation();
event.preventDefault();
}
Preventing default behavior in the dragover event “indicates that element is a draggable location”, as seen in MDN docs here, here and here. Then the drop event will work.