Skip to content

Add a default value for multiselect #158

@kantuni

Description

@kantuni

Multiselect should have a default value.
Note (double check with @tvst): Use indices to keep the API similar to st.select.

options = ("Green", "Yellow", "Red", "Blue")

default = (0, 1)
if st.checkbox("Change default"):
    default = (1, 2)

multiselect = st.multiselect("Multiselect", options, default)
st.write(multiselect)

P.S. Uncomment line 1399 in DeltaGenerator.py

Metadata

Metadata

Assignees

Labels

type:enhancementRequests for feature enhancements or new features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions