Completely updated React, fixed #11, (hopefully)
This commit is contained in:
32
goTorrentWebUI/node_modules/react-dropzone/dist/es/index.js
generated
vendored
32
goTorrentWebUI/node_modules/react-dropzone/dist/es/index.js
generated
vendored
@@ -286,19 +286,25 @@ var Dropzone = function (_React$Component) {
|
||||
}, {
|
||||
key: 'onFileDialogCancel',
|
||||
value: function onFileDialogCancel() {
|
||||
var _this4 = this;
|
||||
|
||||
// timeout will not recognize context of this method
|
||||
var onFileDialogCancel = this.props.onFileDialogCancel;
|
||||
var fileInputEl = this.fileInputEl;
|
||||
var isFileDialogActive = this.isFileDialogActive;
|
||||
// execute the timeout only if the onFileDialogCancel is defined and FileDialog
|
||||
// is opened in the browser
|
||||
// execute the timeout only if the FileDialog is opened in the browser
|
||||
|
||||
if (onFileDialogCancel && isFileDialogActive) {
|
||||
if (this.isFileDialogActive) {
|
||||
setTimeout(function () {
|
||||
// Returns an object as FileList
|
||||
var FileList = fileInputEl.files;
|
||||
if (!FileList.length) {
|
||||
isFileDialogActive = false;
|
||||
if (_this4.fileInputEl != null) {
|
||||
// Returns an object as FileList
|
||||
var files = _this4.fileInputEl.files;
|
||||
|
||||
|
||||
if (!files.length) {
|
||||
_this4.isFileDialogActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof onFileDialogCancel === 'function') {
|
||||
onFileDialogCancel();
|
||||
}
|
||||
}, 300);
|
||||
@@ -472,8 +478,8 @@ Dropzone.propTypes = {
|
||||
disableClick: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* Enable/disable the dropzone entirely
|
||||
*/
|
||||
* Enable/disable the dropzone entirely
|
||||
*/
|
||||
disabled: PropTypes.bool,
|
||||
|
||||
/**
|
||||
@@ -502,12 +508,12 @@ Dropzone.propTypes = {
|
||||
name: PropTypes.string,
|
||||
|
||||
/**
|
||||
* Maximum file size
|
||||
* Maximum file size (in bytes)
|
||||
*/
|
||||
maxSize: PropTypes.number,
|
||||
|
||||
/**
|
||||
* Minimum file size
|
||||
* Minimum file size (in bytes)
|
||||
*/
|
||||
minSize: PropTypes.number,
|
||||
|
||||
|
Reference in New Issue
Block a user