-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Add clarifcation in Docs regarding Magic
bahvior when using Vue & action
#17849
Comments
Documented here: https://storybook.js.org/docs/react/essentials/actions#automatically-matching-args If you have suggestions for how to improve the documentation or make it more discoverable, please let us know! |
@shilman However, I dont think we are talking about the same issue. means that any argTypes that starts with
onChange above becomes action without explicitly stating that it is. However, what I am talking about is that
like above emitted events gets registered in control by their original name However,
this does not work. I have to change it as
to register them as actions. And this is not a behavior that is described in the link you gave me. I will be more than happy to make a PR if the strange behavior I am talking about is something you also recognize as such. Hope we can be on the same page. Thanks |
@minseoksuh This sounds like a bug to me. Do you a have a reproduction repo you can share? If not, can you create one? See how to create a repro. |
@shilman Here is the reproduction.
I don't think this is a behavior storybook was not aware of. What I am saying, is since storybook automatically adds https://storybook.js.org/docs/vue/essentials/actions something like
Thanks again. |
I think this is what we'll be doing until this is better supported.
This will remove the
|
Is your feature request related to a problem? Please describe
A clear and concise description of the problem. E.g. I'm always frustrated when [...]
When using
Vue
withstorybook
the storybook is automatically adding 'on' prefix to emitted events.
Is this behavior offically documented anywhere?
If not, I think it should be more explicitly documented.
For example,
I am making a component that emits
defining story
like this does not work.
I have to add
on
and make it camelCaselike this. To actually connect actions to
click
anddelete
event.Is storybook doing this by default?
This may lead to strange cases like below.
Please let me know if I missed something.
Thanks
Describe the solution you'd like
What would you like to see added to Storybook to solve problem?
Describe alternatives you've considered
Any alternative solutions or features you've considered.
Are you able to assist to bring the feature to reality?
no | yes, I can...
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: