mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Fix a bug that locked submit button in disabled mode
This commit is contained in:
parent
9c9c99c714
commit
343d6bfea2
@ -85,6 +85,11 @@ let RegisterPieceForm = React.createClass({
|
|||||||
if (digitalWorkFile &&
|
if (digitalWorkFile &&
|
||||||
(digitalWorkFile.status === 'deleted' || digitalWorkFile.status === 'canceled')) {
|
(digitalWorkFile.status === 'deleted' || digitalWorkFile.status === 'canceled')) {
|
||||||
this.refs.form.refs.thumbnail_file.reset();
|
this.refs.form.refs.thumbnail_file.reset();
|
||||||
|
|
||||||
|
// Manually we need to set the ready state for `thumbnailKeyReady` back
|
||||||
|
// to `true` as `ReactS3Fineuploader`'s `reset` method triggers
|
||||||
|
// `setIsUploadReady` with `false`
|
||||||
|
this.refs.submitButton.setReadyStateForKey('thumbnailKeyReady', true);
|
||||||
this.setState({ digitalWorkFile: null });
|
this.setState({ digitalWorkFile: null });
|
||||||
} else {
|
} else {
|
||||||
this.setState({ digitalWorkFile });
|
this.setState({ digitalWorkFile });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user