New component: dash_dropdown_components

I’m an extensive user of ddc.Dropdown but noticed it’s behavior can be a bit smarter sometimes, so I made dash_dropdown_components.Dropdown, which is similar but has some extra features:

– When multi=True, the dropdown stays open after selection (unlike dcc.Dropdown). You can override this with close_on_select=False. There is an issue for this and a merge request but it has not been implemented yet in the official dcc.Dropdown.
– When switching multi=True to multi=False dynamically, the first selected item is automatically preserved—no need for callbacks.
– Clearable for multi=True and not clearable for multi=False by default, or control using clearable option.

There’s also a second component dash_dropdown_components.MultiLevelDropdown, which supports nested dropdowns, although it still needs some refinement (scrollbars turned out to be hard to implement).

I hope it can help, and feedback is appreciated!

More info in Github.

ddc_screencap

3 Likes