Add missing type attibute to FileComponent (#3481)
This commit is contained in:
parent
b21e2efaf0
commit
066ecbe3e2
1 changed files with 11 additions and 0 deletions
|
@ -18,6 +18,7 @@ export const FileComponent = ({
|
|||
const { t } = useTranslation("dynamic");
|
||||
const { control } = useFormContext();
|
||||
const [filename, setFilename] = useState("");
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
return (
|
||||
<FormGroup
|
||||
|
@ -35,8 +36,18 @@ export const FileComponent = ({
|
|||
<FileUpload
|
||||
id={name!}
|
||||
value={value}
|
||||
type="text"
|
||||
filename={filename}
|
||||
isDisabled={isDisabled}
|
||||
onFileInputChange={(_, file) => setFilename(file.name)}
|
||||
onReadStarted={() => setIsLoading(true)}
|
||||
onReadFinished={() => setIsLoading(false)}
|
||||
onClearClick={() => {
|
||||
onChange("");
|
||||
setFilename("");
|
||||
}}
|
||||
isLoading={isLoading}
|
||||
allowEditingUploadedText={false}
|
||||
onChange={(value, filename) => {
|
||||
onChange(value);
|
||||
setFilename(filename);
|
||||
|
|
Loading…
Reference in a new issue