storybookjs/storybook

[Bug]: Null can't show as a type with React/Vite/Typescript

クローズ

#32,106 opened on 2025/07/22

 (2 件のコメント) (3 件のリアクション) (1 人の担当者)TypeScript (10,058 件のフォーク)batch import
argtypesbughelp wanted

Repository metrics

Stars
 (89,909 個のスター)
PR merge metrics
 (平均マージ 7d 22h) (30d で 184 merged PRs)

説明

Describe the bug

I expect to see string, null, and number as valid options but null is always removed. I've toggled every option I can find documentation for, but have not figured out how to get null to show.

Reproduction link

https://stackblitz.com/edit/github-fdkzfbvz?file=src%2Fstories%2FButton.tsx

Reproduction steps

  1. Go to above link
  2. See that it looks like screenshot above

System

Storybook Environment Info:

  System:
    OS: Windows 11 10.0.22621
    CPU: (24) x64 12th Gen Intel(R) Core(TM) i7-12850HX
  Binaries:
    Node: 22.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD <----- active
  Browsers:
    Edge: Chromium (136.0.3240.92)
  npmPackages:
    @storybook/addon-docs: ^9.0.18 => 9.0.18
    @storybook/addon-onboarding: ^9.0.18 => 9.0.18
    @storybook/react-vite: ^9.0.18 => 9.0.18
    eslint-plugin-storybook: ^9.0.18 => 9.0.18
    storybook: ^9.0.18 => 9.0.18

Additional context

No response

コントリビューターガイド