I have a story with a controls panel under it, and when I make changes in the controls panel, the story canvas re-renders as expected. However the "Show code" block just underneath only ever shows the initial args passed to the story. I have a parameters.docs.source.transform function, which is only called once when the story initially renders. It appears that calling updateArgs (which the controls addon appears to do under the hood) doesn't trigger anything in the docs addon to execute the transform function again with the updated arguments.
To Reproduce
I don't have the ability to create a stackblitz reproduction at the moment, but I'll try to get one added this evening.
Update: I am not going to be able to make a reproduction for at least a few days due to going out of town, but here is a screen recording showing the issue.
Describe the bug
I have a story with a controls panel under it, and when I make changes in the controls panel, the story canvas re-renders as expected. However the "Show code" block just underneath only ever shows the initial args passed to the story. I have a
parameters.docs.source.transform
function, which is only called once when the story initially renders. It appears that callingupdateArgs
(which the controls addon appears to do under the hood) doesn't trigger anything in the docs addon to execute thetransform
function again with the updated arguments.To Reproduce
I don't have the ability to create a stackblitz reproduction at the moment, but I'll try to get one added this evening.
The transform function looks like this:
Update: I am not going to be able to make a reproduction for at least a few days due to going out of town, but here is a screen recording showing the issue.
https://github.com/storybookjs/storybook/assets/198075/8644a0ea-e67b-4724-b75c-a335a85983ce
System
Additional context
No response