impaktapps-ui-builder 0.0.963-CopyComponent.3 → 0.0.963-CopyComponent.5

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.
@@ -8254,13 +8254,14 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8254
8254
  var _a;
8255
8255
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8256
8256
  const rowId = dynamicData2.path.split(".")[1];
8257
- const updatedPath = `${path}.elements[${rowId}]`;
8257
+ const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
8258
8258
  const formData = getFormdataFromSessionStorage(updatedPath);
8259
8259
  const insertComponentPath = formData.elements.length;
8260
8260
  const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
8261
8261
  const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
8262
8262
  saveFormdataInSessionStorage(copiedData, finalPath);
8263
8263
  sessionStorage.removeItem("copiedComponent");
8264
+ this.setPage();
8264
8265
  }
8265
8266
  };
8266
8267
  };
@@ -8368,13 +8369,14 @@ var pageMaster = (funcParams) => {
8368
8369
  var _a;
8369
8370
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8370
8371
  const rowId = dynamicData2.path.split(".")[1];
8371
- const updatedPath = `${path}.elements[${rowId}]`;
8372
+ const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
8372
8373
  const formData = getFormdataFromSessionStorage(updatedPath);
8373
8374
  const insertComponentPath = formData.elements.length;
8374
8375
  const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
8375
8376
  const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
8376
8377
  saveFormdataInSessionStorage(copiedData, finalPath);
8377
8378
  sessionStorage.removeItem("copiedComponent");
8379
+ this.setPage();
8378
8380
  }
8379
8381
  };
8380
8382
  };