Skip to content

Conversation

@duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Jan 21, 2026

This pull request aims to improve the performance of the Combobox component, specifically when opening/closing the dropdown and searching through lots of options.

Improvements:

  • Refactored isSelected method to use .some() instead of .filter() to avoid unnecessary comparisons.
  • Removed the deep cloning of options in filteredOptions
    • I can't seem to figure out why I added this in the first place, but everything seems to work fine without it.
  • The measureOptionWidths method now only measures the width of the three options with the longest labels, not every option.
  • Enabled the force-mount prop for longer dropdowns, allowing options to be rendered & measurements to happen before the user clicks to open the dropdown.
    • This change seems to have the biggest impact of them all. The Icon fieldtype opens almost instantly, compared to waiting 400(ish) ms before this PR.
  • Fixed an issue where the dropdown's min-height was dependant on the options prop, not filteredOptions.
    • This meant that if you had 10 options, but filtered down via search to just 1, the min-height for 3 and above would remain applied.

Closes #13615

@duncanmcclean duncanmcclean linked an issue Jan 21, 2026 that may be closed by this pull request
@jasonvarga jasonvarga merged commit 5431581 into master Jan 23, 2026
11 checks passed
@jasonvarga jasonvarga deleted the combobox-performance branch January 23, 2026 20:57
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.

[6.x] Combobox performance

3 participants