fix: File picker disabled state (#5972)

The filepicker in the disable sate was still able to upload the file. Fixed the issue here.
This commit is contained in:
Tolulope Adetula 2021-07-23 10:12:51 +01:00 committed by GitHub
parent a8df4ee010
commit fa76a9a6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,9 @@ class FilePickerComponent extends React.Component<
}
openModal = () => {
this.props.uppy.getPlugin("Dashboard").openModal();
if (!this.props.isDisabled) {
this.props.uppy.getPlugin("Dashboard").openModal();
}
};
render() {