Skip to content

feat(select): support clearable null item in the popup (Base UI parity)#331

Draft
kianbazza wants to merge 1 commit into
07-01-feat_select_extend_items_shape_with_nullable_value_and_keywordsfrom
07-01-feat_select_support_clearable_null_item_in_the_popup_base_ui_parity_
Draft

feat(select): support clearable null item in the popup (Base UI parity)#331
kianbazza wants to merge 1 commit into
07-01-feat_select_extend_items_shape_with_nullable_value_and_keywordsfrom
07-01-feat_select_support_clearable_null_item_in_the_popup_base_ui_parity_

Conversation

@kianbazza

Copy link
Copy Markdown
Collaborator

Rendering <Select.Item value={null}> (or an items entry { value: null, label })
adds an option that clears the selection when chosen. Its label doubles as the
trigger/input placeholder, and it shows as selected while there is no value.

  • Widen Select/Combobox Item value to Value | null and onValueChange to
    receive null when cleared.
  • Relax the single-select selected guard so null matches a null item while an
    empty string still means "no selection".
  • Give a null item an explicit listbox id (its serialized value is '' which the
    listbox otherwise skips) so it registers and stays selectable.
  • Widen the null-safe value/equality helpers to accept Value | null.

Closes UI-319

Rendering <Select.Item value={null}> (or an items entry { value: null, label })
adds an option that clears the selection when chosen. Its label doubles as the
trigger/input placeholder, and it shows as selected while there is no value.

- Widen Select/Combobox Item `value` to `Value | null` and `onValueChange` to
  receive `null` when cleared.
- Relax the single-select selected guard so `null` matches a null item while an
  empty string still means "no selection".
- Give a null item an explicit listbox id (its serialized value is '' which the
  listbox otherwise skips) so it registers and stays selectable.
- Widen the null-safe value/equality helpers to accept `Value | null`.

Closes UI-319
@linear-code

linear-code Bot commented Jul 1, 2026

Copy link
Copy Markdown

UI-319

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ui-canary Ready Ready Preview, Comment Jul 1, 2026 10:59pm

Request Review

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

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