Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Add support for booleans as values for dcc.RadioItems, dcc.CheckList, and dcc.Dropdown #957

Open

Description

@HammadTheOne

These components return the following error when a boolean value is passed and app.run_server(debug=True):

Invalid argument `options[0].value` passed into RadioItems

The components should be updated to natively support boolean values without hacky workarounds involving strings and truth values.

Minimal Example:

import dash
import dash_core_components as dcc
import dash_html_components as html

app = dash.Dash(__name__)

app.layout = html.Div([
    dcc.RadioItems(
        options=[
            {'label': 'New York City', 'value': True},
            {'label': 'Montréal', 'value': 'MTL'},
            {'label': 'San Francisco', 'value': 'SF'}
        ],
        value=True
    )
])


if __name__ == '__main__':
    app.run_server(debug=True)

Activity

  1. DiegoF90 commented on Oct 3, 2022

    @DiegoF90

    Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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