storybookjs/storybook

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

Geschlossen

#32.106 geöffnet am 22.07.2025

 (2 Kommentare) (3 Reaktionen) (1 zugewiesene Person)TypeScript (10.058 Forks)batch import
argtypesbughelp wanted

Repository-Metriken

Stars
 (89.909 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 7T 22h) (184 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide