-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: the view source
functionality doesn't re-render when arguments change
#22645
Comments
<Source>
block doesn't re-render when args change<Source>
block doesn't re-render when arguments change
<Source>
block doesn't re-render when arguments changeview source
functionality doesn't re-render when arguments change
@marcomontalbano thank you for your detailed feedback, i could reproduce the bug easily, it is not related to a specific framework, got it on react and vue |
@chakAs3 you're right! I didn't test them, but checking now I get the same issue with React here: It's the first time I open the Storybook's source code, so I can probably go wrong, but I notice that the Source component is rendered as soon as the SourceContext is updated, but here that context will not update when the storybook/code/ui/blocks/src/blocks/SourceContainer.tsx Lines 73 to 86 in e8c1164
|
hi @marcomontalbano i have already open a PR fixing this,Indeed that is the bug if the hash(arg) already in the current source the function return. always current, not only if the arg is boolean but also if you go back and forth between 2 states |
Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.1.0-alpha.28 containing PR #22807 that references this issue. Upgrade today to the
|
Describe the bug
When working with the
html
template, theview source
functionality doesn't re-render when arguments change. It will render correctly only the first time, but when you set back the attribute, it doesn't update.I'm posting a video to show better the issue that as mentioned below is directly reproducible on your official StackBlitz sandbox.
Registrazione.schermo.2023-05-19.alle.21.11.37.mov
To Reproduce
I'm able to reproduce this issue on any official
html
andlit
sandboxes.From
next
release:From
main
release:I'm able to reproduce it locally by running:
System
Additional context
No response
The text was updated successfully, but these errors were encountered: