@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.
@@ -12253,11 +12253,12 @@ function AddonListItem(_ref) {
12253
12253
  setAddon(addon, initialAddonState.quantity);
12254
12254
  } else {
12255
12255
  removeAddon(addon.id);
12256
- onAddonsValidationChange({
12257
- addonId: addon.id,
12258
- isValid: true
12259
- });
12260
12256
  }
12257
+
12258
+ onAddonsValidationChange({
12259
+ addonId: addon.id,
12260
+ isValid: true
12261
+ });
12261
12262
  };
12262
12263
 
12263
12264
  return React__default.createElement(AddonListItemContainer, {
@@ -12310,7 +12311,11 @@ function AddonListItem(_ref) {
12310
12311
  }), React__default.createElement(TrashButton, {
12311
12312
  color: "error",
12312
12313
  onClick: function onClick() {
12313
- return removeAddon(addon.id);
12314
+ removeAddon(addon.id);
12315
+ onAddonsValidationChange({
12316
+ addonId: addon.id,
12317
+ isValid: true
12318
+ });
12314
12319
  }
12315
12320
  }, React__default.createElement(Icon, {
12316
12321
  icon: "Trash",
@@ -12346,10 +12351,7 @@ function CheckoutAddonsStep() {
12346
12351
  removeAddon = _useAddonsStepModel.removeAddon;
12347
12352
 
12348
12353
  var _useState = React.useState((availableAddons == null ? void 0 : availableAddons.reduce(function (acc, curr) {
12349
- var addonState = addons.find(function (x) {
12350
- return x.addon.id === curr.id;
12351
- });
12352
- acc[curr.id] = !!addonState && addonState.quantity > 0;
12354
+ acc[curr.id] = true;
12353
12355
  return acc;
12354
12356
  }, {})) || {}),
12355
12357
  addonsValidation = _useState[0],