fix: dropzone error on image upload component (#1711)
This commit is contained in:
parent
63d926e196
commit
9e1f31e14c
@ -28,7 +28,7 @@ class ImageUpload extends React.Component<Props> {
|
||||
@observable isUploading: boolean = false;
|
||||
@observable isCropping: boolean = false;
|
||||
@observable zoom: number = 1;
|
||||
file: File;
|
||||
@observable file: File;
|
||||
avatarEditorRef: AvatarEditor;
|
||||
|
||||
static defaultProps = {
|
||||
@ -128,7 +128,12 @@ class ImageUpload extends React.Component<Props> {
|
||||
style={EMPTY_OBJECT}
|
||||
disablePreview
|
||||
>
|
||||
{this.props.children}
|
||||
{({ getRootProps, getInputProps, isDragActive }) => (
|
||||
<div {...getRootProps()} {...{ isDragActive }}>
|
||||
<input {...getInputProps()} />
|
||||
{this.props.children}
|
||||
</div>
|
||||
)}
|
||||
</Dropzone>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user