storybook icon indicating copy to clipboard operation
storybook copied to clipboard

[Bug]: Setting children args via URL param does not work

Open StefanFeser opened this issue 1 year ago • 1 comments

Describe the bug

When setting args via URL param, the children arg is ignored and is not set correctly.

This has already been discussed in #14508 and still seems to be an issue in 7.x See also https://github.com/storybookjs/storybook/issues/14508#issuecomment-815223380

To Reproduce

https://stackblitz.com/edit/github-9mxd72?file=src%2Fstories%2FButton.stories.ts&preset=node

When you open Storybook and set the args via URL params, all args are set correctly, except for children. In fact, the children param will be removed from url completely.

https://github9mxd72-0k2c--6006--7259293c.local-credentialless.webcontainer.io/?path=/story/example-button--primary&args=primary:!false;size:large;children:helloooooooo

System

No response

Additional context

No response

StefanFeser avatar Sep 11 '23 12:09 StefanFeser

@StefanFeser I can reproduce the problem. Your repro shows a couple problems:

  1. When I edit the value in the control, I need to click out in order to commit the change. The story does update correctly when you do that.
  2. When I use the same URL generated by the control in step 1, the arg is ignored completely.

This looks like a fairly serious issue! Thanks for bringing it to our attention. 🙏

shilman avatar Sep 13 '23 12:09 shilman