Skip to content

IBX-12475: Added option groups to the dropdown items - #144

Open
tischsoic wants to merge 1 commit into
IBX-12475-dropdown-basefrom
IBX-12475-dropdown-option-groups
Open

tischsoic wants to merge 1 commit into
IBX-12475-dropdown-basefrom
IBX-12475-dropdown-option-groups

Conversation

@tischsoic

@tischsoic tischsoic commented Sep 7, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12475

Related PRs:

Description:

DropdownSingleInput / DropdownMultiInput accept option groups: an items entry may be { label, items, id? }. A group renders as a non-interactive header (role="group" + aria-labelledby) with its items nested below, the source <select> emits matching <optgroup>s, search keeps a group while one of its items matches and shows "No results found" otherwise, and keyboard focus walks leaf items only. Item rendering moved into an ItemsList sub-component; no new props.

There is no design for grouped items yet — header 14/600 on a 32px row, 16px indent, +4px before a header and no divider are proposals for designer review.

For QA:

Storybook → Dropdown Single / Multi → the "Grouped" stories: headers cannot be focused, ArrowDown/Up skip them, typing hides groups without matches, a nonsense term shows "No results found". In the back office (with the twig + admin-ui PRs): Roles → a role → Policy create → "Choose a Policy".

Documentation:

The dropdown items list only knew a flat list, so admin-ui kept the
legacy dropdown for every ChoiceType with optgroups. Entries may now be
plain items or {label, items} groups: the panel renders a non-interactive
group header (role=group, aria-labelledby) with its items nested, the
source select emits matching optgroups, search keeps a group while one of
its items matches and shows a no-results row otherwise, and keyboard focus
walks leaf items only. Rendering moved into an ItemsList sub-component so
ItemsContainer stays within the file size limit.

Co-authored-by: Claude <noreply@anthropic.com>
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