Skip to content

TypedState breaks when setting dataclass value to dataclass field #74

@Jo-Byr

Description

@Jo-Byr

If a TypedState has a field (value in example) which is a dataclass itself, calling self.data.value = DataClass(...) will fail silently, overwriting the ...__Proxy object and breaking the synchronization with the state.

We have to iterate over the fields of the dataclass and set them one by one instead.

@Thibault-Pelletier

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