question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

disabled prop for dcc.Interval is not used.

See original GitHub issue

We have a disabled prop in the prop type definition of the Interval component, but it is not actually used by the code to disable the interval. Either remove it as we have the max_intervals=0 logic to stop the interval or make it stop the interval.

https://community.plot.ly/t/interval-component-cannot-be-disabled-via-callback/14455

Proposed solution:

  • replace the props argument in setInterval by this.props.
  • remove the disabled check from the interval.
  • check for disabled prop in componentWillReceiveProps.stop the loop if false .
  • restart the loop on disabled = True in componentWillReceiveProps if it was stopped.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
T4rk1ncommented, Nov 29, 2018

Yes that is what I meant.

0reactions
alexcjohnsoncommented, Jan 17, 2019

Closed by #436 - thanks @philip-peterson 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plotly Dash dcc.Interval Disabled Boolean Documentation
If you want to stop that callback, you need a way to set the interval's disabled prop to False . You could do...
Read more >
Interval component cannot be disabled via callback
I'm trying a simple app with the checkbox that will enable/disable Interval timer. Callback is changing 'disabled' property of a Interval ...
Read more >
R: Interval component - R-Project.org
Interval component. Description. A component that repeatedly increments a counter 'n_intervals' with a fixed time delay between each increment.
Read more >
Creating Interactive Data Tables in Plotly Dash | by Akash Kaul
dcc.Interval( id='interval-component', interval=1*1000, # in milliseconds n_intervals=0 ) · @app.callback( Output('component-to-update', 'property') ...
Read more >
Docstrings · DashCoreComponents.jl - JuliaHub
id (String; optional): The ID of this component, used to identify dash components ... or not; prop_name (String; optional): Holds which property is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found