Skip to content

Picking input prop(s) #6

@alexcjohnson

Description

@alexcjohnson

For changing the prop of an input from the default value, right now we have eg:

dcc.DatePickerSingle().props["date"]
dcc.DatePickerRange().props[("start_date", "end_date")]

The great thing about this syntax vs dcc.DatePickerSingle().date is you can easily pick multiple values and pack them into either a list or a dict for your function - and we should allow you to do either of those with the regular id/prop callback definitions too (though list packing would probably have to be a breaking change due to how we unlisted outputs, inputs, and state in dash 1.x)

I don't get why it's formatted to look like a dict though - to me it's more like a method modifying the component's "value" to be some prop(s) other than value.

Also: what if you want one prop as input and another as state? For example a dcc.Store with data as state, modified_timestamp as input? And per #5, what if you want modified_timestamp to be a Trigger, or hidden? We could imagine making tuples:
dcc.Store().props(("modified_timestamp", "state"), "data")
or take advantage of the fact that props can't have dots in them:
dcc.Store().props("modified_timestamp.hidden", "data")

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