@apexcura/ui-components 0.0.13-Beta57 → 0.0.13-Beta58
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 +1 -10
- package/dist/index.mjs +1 -10
- 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,14 +825,6 @@ var UploadElement = (props) => {
|
|
|
825
825
|
reader.readAsDataURL(selectedFile);
|
|
826
826
|
newFileList.push(newFile);
|
|
827
827
|
}
|
|
828
|
-
const updatedFileList = newFileList;
|
|
829
|
-
props.onChange && props.onChange({
|
|
830
|
-
name: props.name,
|
|
831
|
-
value: updatedFileList
|
|
832
|
-
});
|
|
833
|
-
};
|
|
834
|
-
const uploadChange2 = ({ file, fileList }) => {
|
|
835
|
-
const newFileList = fileList.filter((f) => f.name !== file.name);
|
|
836
828
|
props.onChange && props.onChange({
|
|
837
829
|
name: props.name,
|
|
838
830
|
value: newFileList
|
|
@@ -873,7 +865,6 @@ var UploadElement = (props) => {
|
|
|
873
865
|
listType: props.list_type,
|
|
874
866
|
maxCount: props.max_count,
|
|
875
867
|
multiple: true,
|
|
876
|
-
onChange: uploadChange2,
|
|
877
868
|
onPreview: handlePreview,
|
|
878
869
|
showUploadList: true
|
|
879
870
|
},
|
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,14 +769,6 @@ var UploadElement = (props) => {
|
|
|
769
769
|
reader.readAsDataURL(selectedFile);
|
|
770
770
|
newFileList.push(newFile);
|
|
771
771
|
}
|
|
772
|
-
const updatedFileList = newFileList;
|
|
773
|
-
props.onChange && props.onChange({
|
|
774
|
-
name: props.name,
|
|
775
|
-
value: updatedFileList
|
|
776
|
-
});
|
|
777
|
-
};
|
|
778
|
-
const uploadChange2 = ({ file, fileList }) => {
|
|
779
|
-
const newFileList = fileList.filter((f) => f.name !== file.name);
|
|
780
772
|
props.onChange && props.onChange({
|
|
781
773
|
name: props.name,
|
|
782
774
|
value: newFileList
|
|
@@ -817,7 +809,6 @@ var UploadElement = (props) => {
|
|
|
817
809
|
listType: props.list_type,
|
|
818
810
|
maxCount: props.max_count,
|
|
819
811
|
multiple: true,
|
|
820
|
-
onChange: uploadChange2,
|
|
821
812
|
onPreview: handlePreview,
|
|
822
813
|
showUploadList: true
|
|
823
814
|
},
|