Drag and drop dataTransfer.getData is always getting empty string

Viewed 122

I am trying do simple drag and drop functionality. I want set some data in on drag via dataTransfer.setData() and get it on drop via dataTransfer.getData() . I am always getting empty string ("").

Please check the link for reproducing example https://codesandbox.io/s/quizzical-lamport-p7cqiv?file=/src/Sample.js

drag and drop and check console

My Environment:

Browser: Chrome

OS: Windows

React UI library

0 Answers
Related