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

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
@@ -988,17 +988,19 @@ var AddFiles = ({
988
988
  });
989
989
  };
990
990
  (0, import_react7.useEffect)(() => {
991
+ let e;
991
992
  if (newFiles.length > 0) {
992
993
  const currentFiles = questionObject.files ? questionObject.files : [];
993
- const e = {
994
+ e = {
994
995
  target: {
995
996
  value: currentFiles.length + newFiles.length > 0 ? `${currentFiles.length + newFiles.length} files` : "",
996
997
  files: [...currentFiles, ...newFiles]
997
998
  }
998
999
  };
999
- if (e.target.value === "0 files") {
1000
- e.target.value = "";
1001
- }
1000
+ console.log("Files added 1:", JSON.stringify(e));
1001
+ const targetValue = e.target.value === "0 files" ? "" : e.target.value;
1002
+ e = { ...e, target: { ...e.target, value: targetValue } };
1003
+ console.log("Files added 2:", JSON.stringify(e));
1002
1004
  handleQuestionInputChange(e, questionObject);
1003
1005
  setNumberOfFiles(currentFiles.length + newFiles.length);
1004
1006
  setNewFiles([]);