mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-24 02:36:00 +00:00
Show + icon when dragging files
This commit is contained in:
parent
d12a44839e
commit
00ecdf384e
1 changed files with 3 additions and 0 deletions
|
|
@ -10,6 +10,8 @@ export default class DropTarget extends React.Component {
|
|||
supress(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
e.dataTransfer.dropEffect = "copy";
|
||||
e.dataTransfer.effectAllowed = "copyMove";
|
||||
}
|
||||
|
||||
handleDrop(e) {
|
||||
|
|
@ -36,6 +38,7 @@ export default class DropTarget extends React.Component {
|
|||
return (
|
||||
<div
|
||||
{...passThroughProps}
|
||||
onDragStart={this.supress}
|
||||
onDragEnter={this.supress}
|
||||
onDragOver={this.supress}
|
||||
onDrop={this.handleDrop}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue