storybookjs/storybook

[Bug]: Action in object disappears in Controls panel

开放

#29,207 创建于 2024年9月25日

 (5 条评论) (0 个反应) (0 位负责人)TypeScript (10,058 个派生)batch import
bughelp wantedsev:S3

仓库指标

星标
 (89,909 个星标)
PR 合并指标
 (平均合并 7天 22小时) (30 天内合并 184 个 PR)

描述

Describe the bug

After upgrading from Storybook 6 to Storybook 8, we are experiencing an issue when trying to show an object with an Action (import { action } from '@storybook/addon-actions';) in our Controls.

This is our link arg:

This is what we expect, and is shown on the Docs page: image

This is what actually happens: image

The Action does work as expected and is shown in the Actions tab when clicking the link, but it isn't shown in the link object on the Controls.

Reproduction link

https://stackblitz.com/edit/github-39beua?file=src%2Fstories%2FButton.stories.ts

Reproduction steps

  1. Set up a story with controls.
  2. Add an argument with type object to your args, one of the properties should contain an action. (import { action } from '@storybook/addon-actions;)

Expected result: Object is fully shown in controls. Actual result: The property containing an action is missing from the Object in the controls.

System

Storybook Environment Info:

  System:
    OS: macOS 14.6.1
    CPU: (12) arm64 Apple M2 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm <----- active
    pnpm: 9.5.0 - ~/.nvm/versions/node/v18.18.2/bin/pnpm
  Browsers:
    Chrome: 129.0.6668.59
    Edge: 129.0.2792.52
    Safari: 17.6
  npmPackages:
    @storybook/addon-actions: ^8.3.0 => 8.3.0 
    @storybook/addon-essentials: ^8.3.0 => 8.3.0 
    @storybook/addon-links: ^8.3.0 => 8.3.0 
    @storybook/addon-storysource: ^8.3.0 => 8.3.0 
    @storybook/addon-styling-webpack: ^1.0.0 => 1.0.0 
    @storybook/ember: ^8.3.0 => 8.3.0 
    @storybook/ember-cli-storybook: ^0.6.1 => 0.6.1 
    storybook: ^8.3.0 => 8.3.0

Additional context

No response

贡献者指南