Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Problem with Circular Callbacks - Slider changes Input, and Input changes Slider

$
0
0

Hi!
I have a dcc.Slider and a dcc.Input. When I drag the pointer of the Slider I want to change the value of my Input. Likewise, when I write a number in my Input, I want the Slider to automatically change its value. Is there a workaround to the circular error?

@app.callback(
    [Output('durationInput', 'value')],
    [Input('durationSlider', "value")]
)
def input_update(value):
    return [value]

@app.callback(
    [Output('durationSlider', 'value')],
    [Input('durationInput', "value")]
)
def slider_update(value):
    return [value]

Here is an image of what is expected:
image

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images