Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Controls panel does not refresh properly #11586

Closed
priandsf opened this issue Jul 16, 2020 · 3 comments
Closed

Controls panel does not refresh properly #11586

priandsf opened this issue Jul 16, 2020 · 3 comments
Assignees
Milestone

Comments

@priandsf
Copy link

Describe the bug
The controls panel (from addon-controls) does not proper refresh when selecting a different story on the same component.

To Reproduce
Steps to reproduce the behavior:
1 Go to https://lwc-essentials.github.io/storybook/lwc-library/?path=/story/units-1-attributes--default-with-args
2 Add some test to attrString (ex' ABCDEF'). You see the JSON dump being updated
3 Select the next story ('Default With Spread Args'). The attrString in the control panel still hold the previous value but the current component does not consume it. Add one character, 'G', at the end of edited value to make 'ABCDEFG'. Now the component picks up the whole value
4 When you switch back between the 2 stories, it looks like they no have their own values.

Expected behavior
on Step 3, the panel should should empty values

Screenshots
N/A

Code snippets
N/A

System:
"@storybook/core": "6.0.0-rc.8",
System:
OS: macOS 10.15.5
CPU: (16) x64 Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz
Binaries:
Node: 12.18.2 - ~/.nvm/versions/node/v12.18.2/bin/node
Yarn: 1.22.4 - ~/.nvm/versions/node/v12.18.2/bin/yarn
npm: 6.14.5 - ~/.nvm/versions/node/v12.18.2/bin/npm
Browsers:
Safari: 13.1.1

Additional context
N/A

@shilman shilman added this to the 6.0 args milestone Jul 16, 2020
@shilman shilman assigned shilman and tmeasday and unassigned shilman Jul 16, 2020
tmeasday added a commit that referenced this issue Jul 20, 2020
@tmeasday
Copy link
Member

@shilman I think this is likely just a problem with undefined coming down the line into your stateful control component.

I added a repro in the branch 11586-fix-args-refresh:

https://www.loom.com/share/c195dee7689040b7bb5d0edae88d443f

@shilman
Copy link
Member

shilman commented Jul 20, 2020

Yee-haw!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.12 containing PR #11619 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Jul 20, 2020
@priandsf
Copy link
Author

Thanks, first quick tests show it working properly!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants