Open
Conversation
duncanmcclean
added a commit
to statamic/docs
that referenced
this pull request
Feb 6, 2026
it'll 404 until statamic/cms#13843 has been merged and tagged.
This was referenced Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request overhauls the Combobox component to make it faster, more accessible, and less janky.
The current implementation grew slow and messy as we (mostly I) patched edge cases during alpha/beta. After researching how other component libraries handle certain things, I picked up some ideas for improving our own - and this PR is the result.
There's a lot of changes in this PR, so I've tried to list everything I can remember:
Dropdown width
The options dropdown was previously as wide as the longest option. This meant we needed to measure the options in JS (which impacted performance) and resulted in weirdly aligned dropdowns like this:
To keep things tidy, the dropdown is now fixed to the width of the trigger. This does, however, mean that long options may be truncated.
I've adjusted the widths of comboboxes in a few places to account for this after looking through the Control Panel in German 🇩🇪.
I've also added an
adaptiveWidthprop which lets you opt-in to the old behaviour where necessary. We use this in the site selector to handle options with varying lengths.Closes #13615
Dropdown height & virtualization
Previously, the options dropdown would expand to fit the available space.
For example: if the combobox was at the top of the page, and it contained a lot of options, it'd take up a large chunk of the screen:
As recommended by Reka, the dropdown now has a max height of 300px.
Adding a max-height has meant we're able to get rid of the hacky min-heights added in # #13489 to prevent squished options when resizing the viewport.
It also means that Reka's virtualizer works properly, allowing us to ditch our custom
Scrollbarcomponent and rely on the browser's scrollbar. 🎉Other improvements
searchable="false"searchable="false"#13747alignprop to determine the alignment of the dropdown<input>, but it's read-onlySelectcomponent so it more closely mirrors theComboboxdocs