react-dropzone
Advanced tools
Comparing version 1.2.3 to 1.2.4
11
index.js
@@ -45,5 +45,10 @@ var React = require('react'); | ||
this.setState({ | ||
isDragActive: true | ||
}); | ||
// set active drag state only when file is dragged into | ||
// (in mozilla when file is dragged effect is "uninitialized") | ||
var effectAllowed = e.dataTransfer.effectAllowed; | ||
if (effectAllowed === 'all' || effectAllowed === 'uninitialized') { | ||
this.setState({ | ||
isDragActive: true | ||
}); | ||
} | ||
@@ -50,0 +55,0 @@ if (this.props.onDragOver) { |
{ | ||
"name": "react-dropzone", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Simple HTML5 drag-drop zone in React", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
react-dropzone | ||
================= | ||
Simple HTML5 drag-drop zone in React.js. | ||
Simple HTML5 drag-drop zone for file uploads in React.js. | ||
@@ -10,2 +10,9 @@ [![Screenshot of Dropzone](https://raw.githubusercontent.com/paramaggarwal/react-dropzone/master/screenshot.png)](http://paramaggarwal.github.io/react-dropzone/) | ||
Installation | ||
===== | ||
The easiest way to use react-dropzone is to install it from npm and include it in your React build process (using [Webpack](http://webpack.github.io/), [Browserify](http://browserify.org/), etc). | ||
```sh | ||
npm install --save react-dropzone | ||
``` | ||
Usage | ||
@@ -22,2 +29,9 @@ ===== | ||
By default the drop zone can be clicked to bring up the browser file picker. To disable this the `supportClick` property should be set to `false`. | ||
Also multiple files can be uploaded to the drop zone, but this can be disabled by setting the `multiple` property to `false`. The allowed file types can be controlled by the `accept` property, using the same syntax as the [HTML <input> accept Attribute](http://www.w3schools.com/tags/att_input_accept.asp). | ||
Example | ||
===== | ||
```jsx | ||
@@ -24,0 +38,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
119
0
28615
8
120
1