@apexcura/ui-components 0.0.13-Beta60 → 0.0.13-Beta62

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 CHANGED
@@ -793,7 +793,8 @@ 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 existingFiles = Array.isArray(props.value) ? props.value : [];
797
+ const newFileList = [...existingFiles];
797
798
  for (let i = 0; i < fileList.length; i++) {
798
799
  const selectedFile = fileList[i];
799
800
  const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(
@@ -873,7 +874,7 @@ var UploadElement = (props) => {
873
874
  listType: props.list_type,
874
875
  maxCount: props.max_count,
875
876
  multiple: true,
876
- fileList: props.value,
877
+ fileList: Array.isArray(props.value) ? props.value : [],
877
878
  onChange: uploadChange2,
878
879
  onPreview: handlePreview,
879
880
  showUploadList: true
package/dist/index.mjs CHANGED
@@ -737,7 +737,8 @@ 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 existingFiles = Array.isArray(props.value) ? props.value : [];
741
+ const newFileList = [...existingFiles];
741
742
  for (let i = 0; i < fileList.length; i++) {
742
743
  const selectedFile = fileList[i];
743
744
  const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(
@@ -817,7 +818,7 @@ var UploadElement = (props) => {
817
818
  listType: props.list_type,
818
819
  maxCount: props.max_count,
819
820
  multiple: true,
820
- fileList: props.value,
821
+ fileList: Array.isArray(props.value) ? props.value : [],
821
822
  onChange: uploadChange2,
822
823
  onPreview: handlePreview,
823
824
  showUploadList: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.13-Beta60",
3
+ "version": "0.0.13-Beta62",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",