Skip to content

Make focused dropdowns searchable without first opening#3627

Merged
KoolADE85 merged 5 commits into
devfrom
bugfix/3572
Mar 12, 2026
Merged

Make focused dropdowns searchable without first opening#3627
KoolADE85 merged 5 commits into
devfrom
bugfix/3572

Conversation

@KoolADE85

@KoolADE85 KoolADE85 commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

This PR updates dropdowns to be searchable without first opening:

  • When focused, you can now start typing and the dropdown will automatically open with the search field focused.
  • Pressing enter while searching will select/deselect the first available option.

Fixes #3572

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
@github-actions

github-actions Bot commented Feb 24, 2026

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.

Comment on lines +507 to +512
const isSelected =
sanitizedValues.includes(firstVal);
const newSelection = isSelected
? without([firstVal], sanitizedValues)
: append(firstVal, sanitizedValues);
updateSelection(newSelection);

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.

I think this would read better with a standard if else.

@KoolADE85 KoolADE85 merged commit 343c8c4 into dev Mar 12, 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

3 participants