-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaks Angular components using arrays #18198
Comments
I have found a complete workaround for this simple example, which I've pushed to the repository. However this workaround does not work for more complex components. I also added stories showing that disabling controls or manually defining the type still results in error in the browser console, which result in errors for more complex components. |
I confirm that too: I have updated from 6.4.22 to 6.5.3 In the code I have a property like this: |
This is even worse, and also happens in storybook 6.4.22 When properties are not explicitly set in your storyfiles
storybook will just replace object files with a string value. [] => "[]" |
should prob refer to #17004 |
any updates on this issue? |
In theory #19935 has probably fixed this, but I can't get Storybook 7 to work. It may be because I use |
Since updating to Storybook 7.0 I'm no longer experiencing this problem. Thank you. |
I'm on Storybook 7.5.2 and am experiencing the same issue. It keeps giving me the error |
Describe the bug
Storybook replaces array values with a string containing the array as text. A value initialised to an empty array in the component, i.e.
[]
, is replaced with the string"[]"
by Storybook. A value initialised to['foo', 'bar']
is changed to"['foo', 'bar']"
.To Reproduce
I've taken an example from Angular Material and added Storybook. DefaultWithErrors is a story with the default setup, which displays correctly but has errors in the browser console. Better is a story that fixes the errors by duplicating the initial state of the component in the story, but this breaks the Control for dataSource. The Stackblitz of this may require running
turbo run storybook
, if it the attempt on load fails.System
npx sb info
The text was updated successfully, but these errors were encountered: