Repository navigation
Vue2 to Vue3, Working with Inputs and v-model #17555
Answered
by
Juice10
thesheppard
asked this question in
Help
|
In Vue2, Storybook's controls don't trigger the required events for import MyInput from '../src/components/MyInput.vue'
export default {
title: 'Components/MyInput',
component: MyInput,
argTypes: {
value: {
table: { disable: true },
},
},
}
const Template = (args, { argTypes }) => ({
// This is what I'm referring to specifically
props: Object.keys(argTypes).filter((x) => x !== 'value'),
data() {
return { value: '' }
},
components: { MyInput },
template: `<MyInput v-bind="$props" v-model="value" />`,
})
export const Primary = Template.bind({})So now how would const Template = (args ) => ({
setup() {
return { args }
},
components: { MyInput },
template: `<MyInput v-bind="$props" v-model="value" />`,
}) |
Answered by
Juice10
May 23, 2022
Replies: 1 comment
|
I got something similar to work following this blogpost: https://craigbaldwin.com/blog/updating-args-storybook-vue/ |
0 replies
Answer selected by
thesheppard
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got something similar to work following this blogpost: https://craigbaldwin.com/blog/updating-args-storybook-vue/