@stigg/react-sdk 4.4.0-beta.6 → 4.4.0-beta.7

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.
@@ -12628,11 +12628,12 @@ function AddonListItem(_ref) {
12628
12628
  setAddon(addon, initialAddonState.quantity);
12629
12629
  } else {
12630
12630
  removeAddon(addon.id);
12631
- onAddonsValidationChange({
12632
- addonId: addon.id,
12633
- isValid: true
12634
- });
12635
12631
  }
12632
+
12633
+ onAddonsValidationChange({
12634
+ addonId: addon.id,
12635
+ isValid: true
12636
+ });
12636
12637
  };
12637
12638
 
12638
12639
  return React__default.createElement(AddonListItemContainer, {
@@ -12685,7 +12686,11 @@ function AddonListItem(_ref) {
12685
12686
  }), React__default.createElement(TrashButton, {
12686
12687
  color: "error",
12687
12688
  onClick: function onClick() {
12688
- return removeAddon(addon.id);
12689
+ removeAddon(addon.id);
12690
+ onAddonsValidationChange({
12691
+ addonId: addon.id,
12692
+ isValid: true
12693
+ });
12689
12694
  }
12690
12695
  }, React__default.createElement(Icon, {
12691
12696
  icon: "Trash",
@@ -12721,10 +12726,7 @@ function CheckoutAddonsStep() {
12721
12726
  removeAddon = _useAddonsStepModel.removeAddon;
12722
12727
 
12723
12728
  var _useState = useState((availableAddons == null ? void 0 : availableAddons.reduce(function (acc, curr) {
12724
- var addonState = addons.find(function (x) {
12725
- return x.addon.id === curr.id;
12726
- });
12727
- acc[curr.id] = !!addonState && addonState.quantity > 0;
12729
+ acc[curr.id] = true;
12728
12730
  return acc;
12729
12731
  }, {})) || {}),
12730
12732
  addonsValidation = _useState[0],