Skip to content

syncControls() overwrites attributes set from a component internally #81

@HenrikHildebrand

Description

@HenrikHildebrand

Context

We have an input component, which has custom-invalid as an attribute. custom-invalid is controlled from storybook and when set, it sets invalid on the host from the inside and out. We use invalid to determine the styling of the input.

Problem

It appears that when invalid is set, the call to syncControls() in the template function removes the invalid attribute since it's not part of the controls or arguments.

Possible solution

We don't understand the purpose of syncControls() fully and we did a fork and removed that line in getTemplate() which seems to solve our problem. It doesn't seem to cause any other issues with our storybook AFAIK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions