If I create an object with sheet.object('obj', { num: types.number(0) }), set the value of num to 20 in the UI, and then later call sheet.detachObject('num'), I'd expect that the exported state would be empty. Instead I have a key in staticOverrides for the prop.
I can verify this by calling sheet.object again with the same config, and the UI shows its value as 20. My expectation would be that the number should reset to the default 0 value, and that I wouldn't get an exported prop.
It looks like the internal Sheet class only deletes the object from this._objects and not any of the dataverse pointers.
Is this an easy fix?
If I create an object with
sheet.object('obj', { num: types.number(0) }), set the value ofnumto 20 in the UI, and then later callsheet.detachObject('num'), I'd expect that the exported state would be empty. Instead I have a key instaticOverridesfor the prop.I can verify this by calling
sheet.objectagain with the same config, and the UI shows its value as 20. My expectation would be that the number should reset to the default 0 value, and that I wouldn't get an exported prop.It looks like the internal Sheet class only deletes the object from
this._objectsand not any of the dataverse pointers.Is this an easy fix?