Skip to content

Checklist with dictionary value #298

@mxlei01

Description

@mxlei01

It seems that value with dictionary causes only one option to appear:

dcc.Checklist(
    id="account-ad-options",
    options=[
        {'label': 'Optimization', 'value': {"optimization": True}},
        {'label': 'Reports', 'value': {"reports": True}}
    ],
    values=[]
),

image

dcc.Checklist(
    id="account-ad-options",
    options=[
        {'label': 'Optimization', 'value': 'optimization'},
        {'label': 'Reports', 'value': 'reports'}
    ],
    values=[]
),

image

Dictionary as values could be pretty handy to control inputs going inside a function with ChainMap and passing the dictionary as variables into a function with ** (two star).

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