Skip to content

sheet.detachObject doesn't clear staticOverrides #509

Description

@akre54

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions