Skip to content
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

Controls not passing arg prop values to storyObj. #8

Open
unionen opened this issue Oct 26, 2023 · 6 comments
Open

Controls not passing arg prop values to storyObj. #8

unionen opened this issue Oct 26, 2023 · 6 comments

Comments

@unionen
Copy link

unionen commented Oct 26, 2023

Since the 0.9.24 update story argTypes controls are not updating args prop values.

@amritk
Copy link

amritk commented Nov 3, 2023

Yep confirmed this doesn't work for me either, going to downgrade

@khylias
Copy link
Contributor

khylias commented Nov 10, 2023

Additionnal case: Props are passedby String type.

In my case, I've few boolean props and all of them trigger some warning : Invalid prop: type check failed for prop "isLoading". Expected Boolean, got String with value "false".

Storie.js

argTypes: {
  isLoading: { control: "boolean" },
}

Component.vue

props: {
  isLoading: {
    type: Boolean
  }
}

@lasseitorp
Copy link

@khylias I still have the same issue after your patch in 0.9.25 and running Storybook 7.5.3. Downgrading to 0.9.21 still works.

@filiphazardous
Copy link
Contributor

I found the problem. If you look at line 8 of https://github.com/JoJk0/storybook-addon-vue-slots/blob/main/src/render.ts - it will always enter the value directly interpreted as a string. When it is an object - it will be entered as [object Object]. Will provide a PR with a suggested fix in a couple of hours.

@filiphazardous
Copy link
Contributor

@JoJk0 PR to solve the problem provided above. Tell me if you want me to change anything (or feel free to change it yourself, of course). Cheers, and thanks for the good work!

@filiphazardous
Copy link
Contributor

@JoJk0 Another PR to hopefully solve all scenarios of this issue: #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants