@plasmicapp/react-web 0.2.155 → 0.2.156

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.
@@ -2350,6 +2350,15 @@ var StateSpecNode = /*#__PURE__*/function () {
2350
2350
  path: path
2351
2351
  };
2352
2352
  };
2353
+ _proto.deleteStateCell = function deleteStateCell(prefixPath) {
2354
+ var _this = this;
2355
+ [].concat(Object.keys(this._state)).forEach(function (key) {
2356
+ var path = JSON.parse(key);
2357
+ if (shallowEqual(prefixPath, path.slice(0, prefixPath.length))) {
2358
+ delete _this._state[key];
2359
+ }
2360
+ });
2361
+ };
2353
2362
  _proto.setInitialValue = function setInitialValue(path, value) {
2354
2363
  var key = JSON.stringify(path);
2355
2364
  this._state[key].initialValue = value;
@@ -2660,6 +2669,13 @@ function create$StateProxy($$state, leafHandlers) {
2660
2669
  // 2 - delete indices in repeated implicit states, but these can't be exposed, so they don't have onChangeProp
2661
2670
  (_$$state$props$spec$o = (_$$state$props2 = $$state.props)[spec.onChangeProp]) == null ? void 0 : _$$state$props$spec$o.call(_$$state$props2, _get(proxyRoot, currPath.slice(spec.pathObj.length)));
2662
2671
  }
2672
+ var nextPath = getNextPath(property);
2673
+ var nextNode = currNode.makeTransition(property);
2674
+ if (nextNode) {
2675
+ getStateCells(nextNode).forEach(function (node) {
2676
+ node.deleteStateCell(nextPath);
2677
+ });
2678
+ }
2663
2679
  return Reflect.deleteProperty(target, property);
2664
2680
  },
2665
2681
  get: function get(target, property, receiver) {