optimized-react-component-library-xyz123 0.19.11 → 0.19.12

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.mjs CHANGED
@@ -620,7 +620,10 @@ var SelectedFiles = ({
620
620
  let newFiles = questionObject.files.filter((f) => f !== file);
621
621
  const newCountOfFiles = newFiles.length;
622
622
  setNumberOfFiles(newCountOfFiles);
623
- const e = { target: { value: `${newCountOfFiles} files`, files: newFiles } };
623
+ let e = { target: { value: `${newCountOfFiles} files`, files: newFiles } };
624
+ const targetValue = e.target.value === "0 files" ? "" : e.target.value;
625
+ e = { ...e, target: { ...e.target, value: targetValue } };
626
+ console.log("Removing file, new e:", JSON.stringify(e));
624
627
  isTouched(e, questionObject);
625
628
  removeFile(newCountOfFiles);
626
629
  };