ar-design 0.3.11 → 0.3.12

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.
@@ -5,6 +5,7 @@ import { ARIcon } from "../../icons";
5
5
  import Dropzone from "./Dropzone";
6
6
  import Button from "../button";
7
7
  import List from "./List";
8
+ import Utils from "../../../libs/infrastructure/shared/Utils";
8
9
  const Upload = ({ text, files, onChange, allowedTypes, maxSize, type = "list", multiple }) => {
9
10
  // refs
10
11
  const _firstLoad = useRef(false);
@@ -133,7 +134,9 @@ const Upload = ({ text, files, onChange, allowedTypes, maxSize, type = "list", m
133
134
  })();
134
135
  }, [selectedFiles]);
135
136
  useEffect(() => {
136
- if (_firstLoad.current)
137
+ if (!_firstLoad.current && files.length === 0)
138
+ return;
139
+ if (Utils.DeepEqual(files, selectedFiles))
137
140
  return;
138
141
  setSelectedFiles(files);
139
142
  _firstLoad.current = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",