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

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,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 = [...props.value];
796
+ const newFileList = [];
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(
@@ -832,6 +832,7 @@ var UploadElement = (props) => {
832
832
  };
833
833
  const uploadChange2 = ({ file, fileList }) => {
834
834
  const newFileList = fileList.filter((f) => f.name !== file.name);
835
+ console.log("newFileList---------------", newFileList);
835
836
  props.onChange && props.onChange({
836
837
  name: props.name,
837
838
  value: newFileList
@@ -872,6 +873,7 @@ var UploadElement = (props) => {
872
873
  listType: props.list_type,
873
874
  maxCount: props.max_count,
874
875
  multiple: true,
876
+ fileList: props.value,
875
877
  onChange: uploadChange2,
876
878
  onPreview: handlePreview,
877
879
  showUploadList: true
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 = [...props.value];
740
+ const newFileList = [];
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(
@@ -776,6 +776,7 @@ var UploadElement = (props) => {
776
776
  };
777
777
  const uploadChange2 = ({ file, fileList }) => {
778
778
  const newFileList = fileList.filter((f) => f.name !== file.name);
779
+ console.log("newFileList---------------", newFileList);
779
780
  props.onChange && props.onChange({
780
781
  name: props.name,
781
782
  value: newFileList
@@ -816,6 +817,7 @@ var UploadElement = (props) => {
816
817
  listType: props.list_type,
817
818
  maxCount: props.max_count,
818
819
  multiple: true,
820
+ fileList: props.value,
819
821
  onChange: uploadChange2,
820
822
  onPreview: handlePreview,
821
823
  showUploadList: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.13-Beta59",
3
+ "version": "0.0.13-Beta60",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",