Skip to content

Example code in "Add widgets to sidebar" is wrong #808

@unsolicitedcrap

Description

@unsolicitedcrap

Link to doc page in question (if any):
https://streamlit.io/docs/api.html#add-widgets-to-sidebar

Name of the Streamlit feature whose docs need improvement:

add_selectbox = st.sidebar.checkbox(
    'How would you like to be contacted?',
    ('Email', 'Home phone', 'Mobile phone'))
)

What you think the docs should say:

add_selectbox = st.sidebar.radio(
    'How would you like to be contacted?',
    ('Email', 'Home phone', 'Mobile phone'))

Modifications include:

  1. Change checkbox to radio
  2. Remove extra closing parenthesis

Metadata

Metadata

Assignees

Labels

type:bugSomething isn't working as expectedtype:docsRequests for changes to docs (will be rerouted to docs repo)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions