@apexcura/ui-components 0.0.13-Beta57 → 0.0.13-Beta59
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.
- package/dist/index.js +2 -3
- package/dist/index.mjs +2 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -793,7 +793,7 @@ var UploadElement = (props) => {
|
|
|
793
793
|
const [previewImage, setPreviewImage] = (0, import_react23.useState)(null);
|
|
794
794
|
const uploadChange = (fileList) => {
|
|
795
795
|
if (!fileList || fileList.length === 0) return;
|
|
796
|
-
const newFileList = [];
|
|
796
|
+
const newFileList = [...props.value];
|
|
797
797
|
for (let i = 0; i < fileList.length; i++) {
|
|
798
798
|
const selectedFile = fileList[i];
|
|
799
799
|
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(
|
|
@@ -825,10 +825,9 @@ var UploadElement = (props) => {
|
|
|
825
825
|
reader.readAsDataURL(selectedFile);
|
|
826
826
|
newFileList.push(newFile);
|
|
827
827
|
}
|
|
828
|
-
const updatedFileList = newFileList;
|
|
829
828
|
props.onChange && props.onChange({
|
|
830
829
|
name: props.name,
|
|
831
|
-
value:
|
|
830
|
+
value: newFileList
|
|
832
831
|
});
|
|
833
832
|
};
|
|
834
833
|
const uploadChange2 = ({ file, fileList }) => {
|
package/dist/index.mjs
CHANGED
|
@@ -737,7 +737,7 @@ var UploadElement = (props) => {
|
|
|
737
737
|
const [previewImage, setPreviewImage] = useState7(null);
|
|
738
738
|
const uploadChange = (fileList) => {
|
|
739
739
|
if (!fileList || fileList.length === 0) return;
|
|
740
|
-
const newFileList = [];
|
|
740
|
+
const newFileList = [...props.value];
|
|
741
741
|
for (let i = 0; i < fileList.length; i++) {
|
|
742
742
|
const selectedFile = fileList[i];
|
|
743
743
|
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(
|
|
@@ -769,10 +769,9 @@ var UploadElement = (props) => {
|
|
|
769
769
|
reader.readAsDataURL(selectedFile);
|
|
770
770
|
newFileList.push(newFile);
|
|
771
771
|
}
|
|
772
|
-
const updatedFileList = newFileList;
|
|
773
772
|
props.onChange && props.onChange({
|
|
774
773
|
name: props.name,
|
|
775
|
-
value:
|
|
774
|
+
value: newFileList
|
|
776
775
|
});
|
|
777
776
|
};
|
|
778
777
|
const uploadChange2 = ({ file, fileList }) => {
|