Skip to content

Circular callbacks with multiple callbacks seem to work #230

Open
@rcqls

Description

@rcqls

Hi, just reading the documentation about circular callbacks within the same callback which indeed does not work for dash.jl , I gave a try with multiple callbacks and everything was fine except the check of circular callbacks that leads to "circular dependencies" error.

  1. Is it known that the following example is working?
  2. Is it then possible to detect that this is no more a "circular dependencies" error?
  3. Maybe the above example is only working on macos (my current OS)? Are there some people checking if the example is working too?
using Dash, Dates

external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]

app = dash(external_stylesheets=external_stylesheets, suppress_callback_exceptions=true)

app.layout = html_div() do
    dcc_slider(
        id="slider-circular",
        min=0,
        max=20,
        marks=Dict(i => "$i" for i in 0:20),
        value=3,
    ),
    dcc_input(id="input-circular", type="number", min=0, max=20, value=3)
end

callback!(
    app,
    Output("input-circular", "value"),
    Input("slider-circular", "value"),
) do  slider_value
    value =  slider_value
    return value
end
callback!(
    app,
    Output("slider-circular", "value"),
    Input("input-circular", "value"),
) do input_value
    value = input_value
    return value
end
run_server(app, "0.0.0.0", debug=true)

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