Skip to content

dcc.Dropdown: Use virtualized lists for large collections of options#3656

Merged
KoolADE85 merged 9 commits into
devfrom
bugfix/3616
Mar 16, 2026
Merged

dcc.Dropdown: Use virtualized lists for large collections of options#3656
KoolADE85 merged 9 commits into
devfrom
bugfix/3616

Conversation

@KoolADE85

@KoolADE85 KoolADE85 commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

This PR virtualizes lists when rendering lists of options (using react-window library).

Also, replaced a few options.map() calls with a Set for faster lookups.

This allows the dropdown component to render huge amounts of options without any perceivable performance impact.

Fixes #3616

Contributor Checklist

  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • I have added entry in the CHANGELOG.md
  • If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follows
    • this GitHub #PR number updates the dash docs
    • here is the show and tell thread in Plotly Dash community
@KoolADE85 KoolADE85 marked this pull request as ready for review March 12, 2026 15:50
@github-actions

Copy link
Copy Markdown

Thank you for your contribution to Dash! 🎉

@T4rk1n T4rk1n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃 Looks good

@KoolADE85 KoolADE85 merged commit eb69078 into dev Mar 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants