disabled prop for dcc.Interval is not used.
See original GitHub issueWe 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:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes that is what I meant.
Closed by #436 - thanks @philip-peterson 🎉