Skip to content

Change type of select placeholder from string to ReactNode #693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DanielleHuisman
Copy link

@DanielleHuisman DanielleHuisman commented Mar 18, 2025

Description

The placeholder prop of Select currently accepts only the string type, but the prop is passed directly to SelectPrimitive.Value (source), which accepts any React node (source).

This PR changes to placeholder type to ReactNode, which resolves the inconsistency.

Testing steps

Pass a React node to placeholder and it will produce a type error.

Relates issues / PRs

None

Copy link

vercel bot commented Mar 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
themes-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 2:18pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant