Hide drag & drop area on drop event regardless of success
parent
139fc994e2
commit
bb7006bda1
|
@ -50,8 +50,9 @@ const UI = React.createClass({
|
||||||
handleDrop (e) {
|
handleDrop (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
this.setState({ draggingOver: false });
|
||||||
|
|
||||||
if (e.dataTransfer && e.dataTransfer.files.length === 1) {
|
if (e.dataTransfer && e.dataTransfer.files.length === 1) {
|
||||||
this.setState({ draggingOver: false });
|
|
||||||
this.props.dispatch(uploadCompose(e.dataTransfer.files));
|
this.props.dispatch(uploadCompose(e.dataTransfer.files));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue