From 066ecbe3e224e7b07487cc6c9fb0da57d8d6ed99 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 10 Oct 2022 18:04:07 +0200 Subject: [PATCH] Add missing type attibute to FileComponent (#3481) --- .../admin-ui/src/components/dynamic/FileComponent.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/admin-ui/src/components/dynamic/FileComponent.tsx b/apps/admin-ui/src/components/dynamic/FileComponent.tsx index 1ebffca23c..569c601e09 100644 --- a/apps/admin-ui/src/components/dynamic/FileComponent.tsx +++ b/apps/admin-ui/src/components/dynamic/FileComponent.tsx @@ -18,6 +18,7 @@ export const FileComponent = ({ const { t } = useTranslation("dynamic"); const { control } = useFormContext(); const [filename, setFilename] = useState(""); + const [isLoading, setIsLoading] = useState(false); return ( setFilename(file.name)} + onReadStarted={() => setIsLoading(true)} + onReadFinished={() => setIsLoading(false)} + onClearClick={() => { + onChange(""); + setFilename(""); + }} + isLoading={isLoading} + allowEditingUploadedText={false} onChange={(value, filename) => { onChange(value); setFilename(filename);