Select: Support placeholder prop on Trigger#78076
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: 0 B Total Size: 7.92 MB ℹ️ View Unchanged
|
|
Flaky tests detected in a307d52. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25530899575
|
What?
Adds a
placeholderprop to theSelect.Triggerprimitive, defaulting toSelect, and aligns placeholder styling with Base UI's built-in placeholder state.Also updates the Select stories to demonstrate a custom placeholder and a clearable
nullvalue option.Why?
Base UI now provides official placeholder handling for Select. Using that state directly keeps the wrapper behavior aligned with upstream and avoids relying on an empty-string item value as a placeholder convention.
How?
placeholderfromSelect.Triggerto Base UI'sSelect.Value.data-placeholderattribute for placeholder styling.Select.Itemvalues to benull, matching Base UI's clearable item pattern.Testing Instructions
Design System/Components/Form/Primitives/Select.Screenshots or screencast