Hi, what's the correct way to handle v-model in Storybook stories? Example:
import DataPaginator from '../DataPaginator.vue';
import type { Meta, StoryObj } from '@storybook/vue3';
import { action } from '@storybook/addon-actions';
const meta: Meta<typeof DataPaginator> = {
title: 'Shared/DataPaginator',
component: DataPaginator,
tags: ['autodocs'],
};
export const Basic: StoryObj<typeof DataPaginator> = {
args: {
itemsLength: 83,
itemsPerPage: 10,
page: 1,
'onUpdate:items-per-page': action('onUpdate:items-per-page'),
'onUpdate:page': action('onUpdate:page'),
},
};
export default meta;
this works fine, like when I change the page or items per page, I see the event in Storybook. but it doesn't actually update the page number. how can I make it so onUpdate:page will actually dynamically alter the page prop?