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

貢獻者指南