From fa76a9a6e9f17b527e993f0fb0ddcc5439ea8e3e Mon Sep 17 00:00:00 2001 From: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com> Date: Fri, 23 Jul 2021 10:12:51 +0100 Subject: [PATCH] fix: File picker disabled state (#5972) The filepicker in the disable sate was still able to upload the file. Fixed the issue here. --- .../components/designSystems/appsmith/FilePickerComponent.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/client/src/components/designSystems/appsmith/FilePickerComponent.tsx b/app/client/src/components/designSystems/appsmith/FilePickerComponent.tsx index 834ef89be8..c7732b0ff0 100644 --- a/app/client/src/components/designSystems/appsmith/FilePickerComponent.tsx +++ b/app/client/src/components/designSystems/appsmith/FilePickerComponent.tsx @@ -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() {