@orderingstack/front-components-product-configurator 1.4.2-beta.17 → 1.4.2-beta.19

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
@@ -6913,11 +6913,11 @@ const selectProductsInForm = (productToUnselect, setValueInForm, initialSelected
6913
6913
  };
6914
6914
  function useMenuOptions(product, nestedLvl, parentKind, parentSelCtx) {
6915
6915
  const { selCtx, attrs = {} } = product;
6916
- useStore((state) => state.filter);
6917
6916
  const initialSelected = useStore((state) => state.initialSelected);
6918
6917
  const currency = useStore((state) => state.currency);
6919
- const { setValue, getValues } = useFormContext();
6920
- const { selected = {}, filter = {} } = getValues();
6918
+ const { setValue, getValues, watch } = useFormContext();
6919
+ const selected = watch("selected");
6920
+ const filter = watch("filter") || {};
6921
6921
  const isFilterValidated = validateProductFilter(product, filter);
6922
6922
  const isOnSubmitted = useStore((state) => state.isOnSubmitted);
6923
6923
  const setValidationMap = useStore((state) => state.setValidationMap);