@metron-labs/quote-react 0.1.23 → 0.1.24

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.
@@ -33,6 +33,10 @@ function QuickQuoteInner({ fullPage = false, hideHeader = false, internal = fals
33
33
  track("viewed");
34
34
  }, [track]);
35
35
  useEffect(() => {
36
+ for (const item of Object.values(cart)) {
37
+ if (getPricingBreakdown(item).requiredSellUnits != null)
38
+ resolvedConversionInputs.current.delete(item.lineId);
39
+ }
36
40
  const unresolved = Object.values(cart).filter((item) => {
37
41
  if (item.productId === "-" || getPricingBreakdown(item).requiredSellUnits != null)
38
42
  return false;
@@ -56,6 +56,10 @@ export default function BasketStage({ cart, onUpdateQty, onUpdateSellUnits, onRe
56
56
  useEffect(() => {
57
57
  if (!onResolveConversions)
58
58
  return;
59
+ for (const item of Object.values(cart)) {
60
+ if (getPricingBreakdown(item).requiredSellUnits != null)
61
+ resolvedProductIds.current.delete(item.lineId);
62
+ }
59
63
  const unresolved = Object.values(cart).filter((item) => item.productId !== "-" && getPricingBreakdown(item).requiredSellUnits == null && !resolvedProductIds.current.has(item.lineId));
60
64
  if (unresolved.length === 0)
61
65
  return;