Skip to content

fix(form-react): set combobox id for select field having hasMany#172

Open
MurzNN wants to merge 1 commit into
buildnbuzz:mainfrom
Murz-forks:bugfix/fix-select-many-label
Open

fix(form-react): set combobox id for select field having hasMany#172
MurzNN wants to merge 1 commit into
buildnbuzz:mainfrom
Murz-forks:bugfix/fix-select-many-label

Conversation

@MurzNN

@MurzNN MurzNN commented Jun 23, 2026

Copy link
Copy Markdown

Description

Fixes #170 — clicking the label for a multi-select (hasMany: true) field did not focus the control, while single-select worked as expected.

For single select, FieldLabel uses htmlFor={fieldApi.name} and that id is set on ComboboxInput. For multi select, the UI uses ComboboxChips / ComboboxChipsInput instead, so no element had the matching id and label clicks had no effect.

This change passes id={fieldApi.name} to Combobox when hasMany is true so the label’s htmlFor associates with the multi-select input.

Changes

React Adapter (form-react)

  • apps/web/registry/shadcn/fields/select.tsx: set id={hasMany ? fieldApi.name : undefined} on Combobox for multi-select fields

Type of change

  • feat (New feature)
  • fix (Bug fix)
  • docs (Documentation changes)
  • refactor (Refactoring code without changing behavior)
  • test (Adding or updating tests)
  • chore (Maintenance, CI/CD, or Ops-related changes)

Related Issues

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@MurzNN is attempting to deploy a commit to the ladparth Team on Vercel.

A member of the Team first needs to authorize it.

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.

[BUG] Label for "select" field is not clickable with hasMany=true

1 participant