@apexcura/ui-components 0.0.13-Beta56 → 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 -5
- package/dist/index.mjs +1 -5
- 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,9 +825,6 @@ var UploadElement = (props) => {
|
|
|
825
825
|
reader.readAsDataURL(selectedFile);
|
|
826
826
|
newFileList.push(newFile);
|
|
827
827
|
}
|
|
828
|
-
};
|
|
829
|
-
const uploadChange2 = ({ file, fileList }) => {
|
|
830
|
-
const newFileList = fileList.filter((f) => f.name !== file.name);
|
|
831
828
|
props.onChange && props.onChange({
|
|
832
829
|
name: props.name,
|
|
833
830
|
value: newFileList
|
|
@@ -868,7 +865,6 @@ var UploadElement = (props) => {
|
|
|
868
865
|
listType: props.list_type,
|
|
869
866
|
maxCount: props.max_count,
|
|
870
867
|
multiple: true,
|
|
871
|
-
onChange: uploadChange2,
|
|
872
868
|
onPreview: handlePreview,
|
|
873
869
|
showUploadList: true
|
|
874
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,9 +769,6 @@ var UploadElement = (props) => {
|
|
|
769
769
|
reader.readAsDataURL(selectedFile);
|
|
770
770
|
newFileList.push(newFile);
|
|
771
771
|
}
|
|
772
|
-
};
|
|
773
|
-
const uploadChange2 = ({ file, fileList }) => {
|
|
774
|
-
const newFileList = fileList.filter((f) => f.name !== file.name);
|
|
775
772
|
props.onChange && props.onChange({
|
|
776
773
|
name: props.name,
|
|
777
774
|
value: newFileList
|
|
@@ -812,7 +809,6 @@ var UploadElement = (props) => {
|
|
|
812
809
|
listType: props.list_type,
|
|
813
810
|
maxCount: props.max_count,
|
|
814
811
|
multiple: true,
|
|
815
|
-
onChange: uploadChange2,
|
|
816
812
|
onPreview: handlePreview,
|
|
817
813
|
showUploadList: true
|
|
818
814
|
},
|