Skip to content

[BUG] Dropdown Search must prioritize front matches before body matches #1232

Closed

Description

I am using:

dash                 1.11.0
dash-core-components 1.9.1
dash-html-components 1.0.3
dash-renderer        1.4.0
dash-table           4.6.2

This issue is not Front-End Related

**Describe the bug**

I am using the dcc.Dropdown with a list of over 5000 stock ticker symbols.  If I select any letter besides A, I am presented with all of the stocks that include that letter, not all of the stocks that begin with that letter.  It is therefore impossible to access the stock I am looking for without typing it out entirely, or using the scrollbar and manually scrolling down to it (required for 1 and 2 character symbols).  For example (screenshots), by typing M, I am offered AAMC, AAE, ABM, and 349 other symbols before getting to the one I want M (Macy's) and even hard-typing M (Enter) returns AAMC, which is why I this should be considered a bug and not a feature request.

**Expected behavior**

It would be expected that a dropdown searchbar prioritize front matches before body matches.  Body matches are nice, but most dropdown bars I've used only return front matches and ignore body matches.

**Screenshots**

Screenshots are attached as well as a file including my list of stock symbols to use as labels

Screen Shot 2020-05-05 at 4 03 49 PM

Screen Shot 2020-05-05 at 4 07 48 PM

[syms.txt](https://github.com/plotly/dash/files/4583478/syms.txt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions