Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Dropdown "multi" argument not working in latest release #1920

Closed
GoldwinXS opened this issue Feb 12, 2022 · 3 comments
Closed

[BUG] Dropdown "multi" argument not working in latest release #1920

GoldwinXS opened this issue Feb 12, 2022 · 3 comments

Comments

@GoldwinXS
Copy link

GoldwinXS commented Feb 12, 2022

Describe your context

  • python 3.9

  • latest release

  • if frontend related, tell us your Browser, Version and OS
    chrome, safari, probably all

Describe the bug

multi argument for Dropdown is not working. Adding that argument results in only one value in the list, and the text for the dropdown does not update. In the exact same situation (literally just commenting out multi=True) gives a dropdown with the correct behaviour.

I can add my code if you'd like, but it absolutely accounts for multi dropdown behaviour.

Expected behavior (behavioUr c'mon you're a canadian company :P)

I expect that the "multi" argument from dcc.Dropdown behaves like previous versions of dash, where value yields a list of variable length.

Screenshots

I've downgraded dash to 1.21.0 and that's fixed my issue. I don't really feel like recreating it and ultimately going through more effort here, as it has already wasted a lot of my time...

@GoldwinXS GoldwinXS changed the title [BUG] [BUG] Dropdown "multi" argument not working in latest release Feb 12, 2022
@BWalzer
Copy link

BWalzer commented Apr 4, 2022

I'm running into the same issue. I think commas in the options are causing this. Here's an example where the first dropdown works, but the second doesn't.

app.layout = html.Div(
    [
        # This dropdown works as expected: Montreal, San Francisco, and New York City
        #   are all options to choose, with Montreal and San Francisco selected when loaded.
        dcc.Dropdown(
            ['New York City', 'Montreal', 'San Francisco'],
            ['Montreal', 'San Francisco'],
            multi=True
        ),

        # This dropdown DOES NOT work as expected: Montreal, San Francisco, and New York City
        #   are all options to choose, but nothing is selected when loaded.
        #   Trying to select new options does not update the dropdown menu.
        dcc.Dropdown(
            ['New York City, NY', 'Montreal, QC', 'San Francisco, CA'],
            ['Montreal, QC', 'San Francisco, CA'],
            multi=True
        )
    ]
)

python 3.6.8
dash version 2.1.0

@nickmelnikov82
Copy link
Member

Duplicate of #1908

@T4rk1n
Copy link
Contributor

T4rk1n commented Aug 3, 2022

Fixed by #1970

@T4rk1n T4rk1n closed this as completed Aug 3, 2022
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

No branches or pull requests

4 participants