@pnkx-lib/ui 1.9.464 → 1.9.466

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11528,8 +11528,9 @@ function GenericUploadModal({
11528
11528
  return false;
11529
11529
  },
11530
11530
  onPreview: (file) => {
11531
+ const fileUrl = file.url || (file.originFileObj ? URL.createObjectURL(file.originFileObj) : "");
11531
11532
  const link = document.createElement("a");
11532
- link.href = file.url || (file.originFileObj ? URL.createObjectURL(file.originFileObj) : "");
11533
+ link.href = fileUrl;
11533
11534
  link.download = file.name || "download";
11534
11535
  link.target = "_blank";
11535
11536
  document.body.appendChild(link);
@@ -41,7 +41,7 @@ const UploadComponent = ({
41
41
  customRequest: async (options) => {
42
42
  const { file, onSuccess, onError } = options;
43
43
  try {
44
- await customRequest?.(file, field.onChange);
44
+ customRequest?.(file, field.onChange);
45
45
  onSuccess?.({}, file);
46
46
  } catch (err) {
47
47
  onError?.(err);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.464",
4
+ "version": "1.9.466",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",