url params don't work for some args (protected names maybe?)
See original GitHub issueDescribe the bug
After reading that storybook supports controlling args through URL parameters [1] [2], I am trying it out, because I had a great use case for linking to a particular set of props for a component from my release notes.
However, it seems that when the prop you want to control is called name, or when you want to control the children prop, this method doesn’t work.
To Reproduce
I have a prop that has a type like this:
name: 'foo' | 'bar' | 'baz' | ...
I tried a URL param like this:
&args=name:foo
but it had no effect.
There are, however, other props that do work just fine, and they have similar types. For example I have props like
color?: 'default' | 'primary' | 'secondary' | 'inherit'
and passing
&args=name:foo;color:secondary
does correctly set the color, even though the name prop gets ignored.
This leads me to suspect that it’s the name name itself that is causing the issue here. adding a new name prop to other components seems to suggest this is reproducible.
I’m also experiencing this with the children prop.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (3 by maintainers)

Top Related StackOverflow Question
I have just realised switching from
react-docgen-typescripttoreact-docgensolves this. I don’t know where to open this bug report. You can checkout this documentation if you don know how to set this parameter.https://storybook.js.org/docs/react/configure/typescript
I also see the same issue but with boolean attributes. When I switch to toggle from true to false it’s work perfect but when I refresh the page I see the error message.