@knovator/pagecreator-admin 1.7.0 → 1.7.1

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.
Files changed (3) hide show
  1. package/index.cjs +3 -2
  2. package/index.js +3 -2
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -7526,10 +7526,11 @@ const WidgetForm = ({
7526
7526
  return item;
7527
7527
  });
7528
7528
  // Clean up fields based on widget type
7529
- if (formData['widgetType'] !== constants.htmlWidgetTypeValue) {
7529
+ const currentWidgetType = formData['widgetType'] || (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value);
7530
+ if (currentWidgetType !== constants.htmlWidgetTypeValue) {
7530
7531
  delete formData['htmlContent'];
7531
7532
  }
7532
- if (formData['widgetType'] !== constants.textWidgetTypeValue) {
7533
+ if (currentWidgetType !== constants.textWidgetTypeValue) {
7533
7534
  delete formData['textContent'];
7534
7535
  }
7535
7536
  const submitPayload = Object.assign(Object.assign(Object.assign(Object.assign({}, formData), {
package/index.js CHANGED
@@ -7514,10 +7514,11 @@ const WidgetForm = ({
7514
7514
  return item;
7515
7515
  });
7516
7516
  // Clean up fields based on widget type
7517
- if (formData['widgetType'] !== constants.htmlWidgetTypeValue) {
7517
+ const currentWidgetType = formData['widgetType'] || (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value);
7518
+ if (currentWidgetType !== constants.htmlWidgetTypeValue) {
7518
7519
  delete formData['htmlContent'];
7519
7520
  }
7520
- if (formData['widgetType'] !== constants.textWidgetTypeValue) {
7521
+ if (currentWidgetType !== constants.textWidgetTypeValue) {
7521
7522
  delete formData['textContent'];
7522
7523
  }
7523
7524
  const submitPayload = Object.assign(Object.assign(Object.assign(Object.assign({}, formData), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knovator/pagecreator-admin",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "dependencies": {
5
5
  "classnames": "^2.3.1",
6
6
  "react-beautiful-dnd": "^13.1.0",