rc-upload
Advanced tools
Comparing version 1.13.0 to 1.13.1
@@ -21,6 +21,2 @@ 'use strict'; | ||
function preventDefault(e) { | ||
e.preventDefault(); | ||
} | ||
var AjaxUploader = _react2['default'].createClass({ | ||
@@ -40,3 +36,6 @@ displayName: 'AjaxUploader', | ||
getInitialState: function getInitialState() { | ||
return { disabled: false }; | ||
return { | ||
disabled: false, | ||
uid: (0, _uid2['default'])() | ||
}; | ||
}, | ||
@@ -150,5 +149,5 @@ | ||
_reset: function _reset() { | ||
this.refs.form.reset(); | ||
this.setState({ | ||
disabled: false | ||
disabled: false, | ||
uid: (0, _uid2['default'])() | ||
}); | ||
@@ -170,15 +169,12 @@ }, | ||
}, | ||
_react2['default'].createElement( | ||
'form', | ||
{ ref: 'form', onSubmit: preventDefault }, | ||
_react2['default'].createElement('input', { | ||
type: 'file', | ||
ref: 'file', | ||
disabled: this.state.disabled, | ||
style: { display: 'none' }, | ||
accept: props.accept, | ||
multiple: this.props.multiple, | ||
onChange: this.onChange | ||
}) | ||
), | ||
_react2['default'].createElement('input', { | ||
type: 'file', | ||
ref: 'file', | ||
key: this.state.uid, | ||
disabled: this.state.disabled, | ||
style: { display: 'none' }, | ||
accept: props.accept, | ||
multiple: this.props.multiple, | ||
onChange: this.onChange | ||
}), | ||
props.children | ||
@@ -185,0 +181,0 @@ ); |
{ | ||
"name": "rc-upload", | ||
"version": "1.13.0", | ||
"version": "1.13.1", | ||
"description": "upload ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
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
22451
513