Skip to content

How to make story args reactive ? #286

@julienchazal

Description

@julienchazal

Hello

My table component has a pagination, i want the content of the table to change when i use pagination
After reading this i tried this:

// Table.stories.svelte

<script lang="ts">
	const tablePaginationProps = {...}
</script>

<Story name="With pagination" args={tablePaginationProps}>
	{#snippet children(args)}
		<Table {...args}></Table>
	{/snippet}
</Story>

if tablePaginationProps is updated, the story is not re-rendered to display new content of the table
how can i do this please ?
i'm using Storybook 8.6.3 and storybook/addon-svelte-csf 5.0.0-next.27

thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions