@orderingstack/front-components-product-configurator 1.4.2-beta.33 → 1.4.2-beta.35

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.es.js CHANGED
@@ -9120,11 +9120,11 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
9120
9120
  const {
9121
9121
  target: { checked, name: selCtx2, defaultValue: productId }
9122
9122
  } = e2;
9123
- selectUnselectProduct(setValue, getValues, product, checked, unregister, nestedLvl);
9123
+ if (!isRadio) {
9124
+ selectUnselectProduct(setValue, getValues, product, checked, unregister, nestedLvl);
9125
+ }
9124
9126
  if (isRadio) {
9125
9127
  console.log("handleOnInputChange radio", selCtx2, productId);
9126
- const selectedContextName = "selected." + selCtx2.replace("radio.", "").split(".")[0];
9127
- setValue(selectedContextName, { [productId]: "1" });
9128
9128
  const otherGroupItems = (_a2 = parentPriduct == null ? void 0 : parentPriduct.items) == null ? void 0 : _a2.filter((x2) => x2.id !== product.id);
9129
9129
  for (const key of Object.keys(selected || {})) {
9130
9130
  const isItemToClear = (otherGroupItems == null ? void 0 : otherGroupItems.some((x2) => !!findProductInParentProductBySelCtx(x2, key))) ? key : false;
@@ -9133,6 +9133,8 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
9133
9133
  setValue(`selected.${key}`, false);
9134
9134
  }
9135
9135
  }
9136
+ const selectedContextName = "selected." + selCtx2.replace("radio.", "").split(".")[0];
9137
+ setValue(selectedContextName, { [productId]: "1" });
9136
9138
  refreshForm();
9137
9139
  }
9138
9140
  };
@@ -11102,7 +11104,8 @@ function ProductConfigurator(props) {
11102
11104
  defaultValues: {
11103
11105
  selected: initSelected,
11104
11106
  filter: initFilter
11105
- }
11107
+ },
11108
+ shouldUnregister: false
11106
11109
  });
11107
11110
  const {
11108
11111
  getValues