Skip to content

docs(cli): make Typeahead/Tokenizer/FileInput showcases interactive#3201

Open
durvesh1992 wants to merge 1 commit into
facebook:mainfrom
durvesh1992:fix/interactive-showcases-3
Open

docs(cli): make Typeahead/Tokenizer/FileInput showcases interactive#3201
durvesh1992 wants to merge 1 commit into
facebook:mainfrom
durvesh1992:fix/interactive-showcases-3

Conversation

@durvesh1992

Copy link
Copy Markdown
Contributor

Summary

Completes the frozen-showcase fixes (after #3199 and #3200). These three showcase blocks rendered controlled components with a static value and a no-op onChange, so their docsite previews were frozen. Wired local state:

  • TypeaheaduseState<SearchableItem | null>(null) (+ 'use client')
  • TokenizeruseState<SearchableItem[]>([...]) (onChange's (items, change) signature accepts the setState setter)
  • FileInputuseState<File | File[] | null>(null)

Testing

  • Each wiring is type-checked against the component's value/onChange signatures (Typeahead (item: T | null) => void, Tokenizer (items: T[], change) => void, FileInput (files: File | File[] | null) => void).
  • Regenerated docsite data — all parse/copy cleanly.

Browser can't launch in my environment, so verified at the type/regen level; a visual confirm on the preview is welcome.

Changeset

Included (@astryxdesign/cli patch).

Completes the frozen-showcase fixes (after facebook#3199, facebook#3200). These rendered
controlled components with a static value + no-op onChange. Wire local
state: Typeahead useState<SearchableItem|null>, Tokenizer
useState<SearchableItem[]>, FileInput useState<File|File[]|null>.
Typeahead also gains 'use client'.
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant