storybookjs/storybook

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

已關閉

#32,106 建立於 2025年7月22日

 (2 則留言) (3 個反應) (1 位負責人)TypeScript (10,058 個分叉)batch import
argtypesbughelp wanted

倉庫指標

星標
 (89,909 顆星)
PR 合併指標
 (平均合併 7天 22小時) (30 天內合併 184 個 PR)

描述

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

貢獻者指南