You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
That function syncs the attributes with the Storybook controls. If attributes are updated from within the component, it will update the values in the control.
Is the invalid attribute settable or is it a side effect from the custom-invalid attribute being set?
Context
We have an input component, which has
custom-invalid
as an attribute.custom-invalid
is controlled from storybook and when set, it setsinvalid
on the host from the inside and out. We useinvalid
to determine the styling of the input.Problem
It appears that when
invalid
is set, the call tosyncControls()
in the template function removes theinvalid
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 ingetTemplate()
which seems to solve our problem. It doesn't seem to cause any other issues with our storybook AFAIK.The text was updated successfully, but these errors were encountered: