v5.2.0
Improvements
-
(Upload component) download files with blob if not given onDownload function
-
(Upload component) new props: listType: "text", onDownload?: (file) => any, showDownloadIcon?: boolean
showDownloadIcon = true is set to all Upload by default, url looks in each file, if it exists, the file download button is active.
When you click "download" - tries to get the file and save it to the computer, catches an error in Notification.
It is possible to throw the onDownload prop in Upload, and perform custom manipulations (in this case, the default function is replaced by onDownload)
Fixes:
- (TranslatableInput) added the ability to pass props to the child component TranslatableInput.
In the field, we specify the name of the child component (editor, text, or multiline text), and in props, we pass all the properties that are required for the child component.
For example:
<TranslatableInput
...
field="editor"
props={{
onImageUpload: onImageUpload,
imageUploadUrl: imageUploadUrl,
...
}}
/>