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
[V6.2.9] Control type OBJECT's value is not set on initial load #15272
Comments
Try upgrading to the latest prerelease:
Does that fix it? |
@shilman Just tried to upgrade to latest pre-release Environment Info:
System:
OS: macOS 11.2.2
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Binaries:
Node: 12.22.1 - ~/.nvm/versions/node/v12.22.1/bin/node
npm: 6.14.12 - ~/.nvm/versions/node/v12.22.1/bin/npm
Browsers:
Chrome: 91.0.4472.114
Firefox: 89.0
Safari: 14.0.3
npmPackages:
@storybook/addon-a11y: ^6.3.0-rc.10 => 6.3.0-rc.10
@storybook/addon-actions: ^6.3.0-rc.10 => 6.3.0-rc.10
@storybook/addon-essentials: ^6.3.0-rc.10 => 6.3.0-rc.10
@storybook/addon-knobs: ^6.2.9 => 6.2.9
@storybook/addon-links: ^6.3.0-rc.10 => 6.3.0-rc.10
@storybook/addon-options: ^6.0.0-alpha.29 => 6.0.0-alpha.29
@storybook/react: ^6.3.0-rc.10 => 6.3.0-rc.10
@storybook/theming: ^6.3.0-rc.10 => 6.3.0-rc.10 But the problem is still there, the object's value still isn't set on load: |
Thanks for trying that @annayap. I tried reproducing, but couldn't. Do you happen to have a reproduction repo you can share? If not, can you create one using |
We were also facing that issue with Storybook for Angular. For us it was related with having an empty string as key for radio option labels in another story file. Main.argTypes = {
arrow: {
control: {
type: 'radio',
labels: {
'': 'None', // 👈 this empty string is the problem
'left': 'Arrow left',
'right': 'Arrow right'
},
options: ['', 'left', 'right']
}
}
} This was done to properly label the empty string option in storybook. This is also working for the actual story, where it was used. But as a side effect some control type for 'object' in other stories do not work properly anymore. So I guess this is a bug in storybook, because this is valid in JSON. Hope that helps. If not, maybe it's something similar like that. Our problem at least shows that story files can have an impact on other story files, which should not happen from my point of view. |
@danielbeckmann Do you a have a reproduction repo you can share? If not, can you create one? See how to create a repro. |
Hi @shilman, sure: https://github.com/danielbeckmann/storybook-issue-15272 |
This is indeed a strange one. @ghengeveld I reproduced but it's not immediately obvious what's going on here. Can you please take a look? |
BUG DESCRIPTION
System
npx sb@next info
output:Additional context
ℹ️ : Last time this worked for us was in
version 6.2.1
❗The text was updated successfully, but these errors were encountered: