Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Ability to set a maximum number of intervals? #222

Closed
chriddyp opened this issue Jul 2, 2018 · 1 comment
Closed

Ability to set a maximum number of intervals? #222

chriddyp opened this issue Jul 2, 2018 · 1 comment

Comments

@chriddyp
Copy link
Member

chriddyp commented Jul 2, 2018

As suggested by a community member:

When I put it this way, the cleanest solution to my problem would be if dcc.Interval() supported the idea of counting a certain number of ticks and then stopping by itself, i.e. had something like a max_intervals parameter. I’m not sure if you have any other use-cases for that but if so, maybe it’s a feature suggestion?

Full discussion: https://community.plot.ly/t/should-i-use-an-interval-for-a-one-off-delay/11375/6

Seems like a pretty good idea, coul dbe useful for general delays and fits nicely into the existing component API

@claresloggett
Copy link

Might also be useful to people trying to "turn off" the Interval, e.g. https://community.plot.ly/t/how-to-turn-off-interval-event/5565 ?

That discussion is about turning it off in response to an event, but if there were a max_intervals parameter we could presumably turn the timer off manually by setting max_intervals=n_intervals.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants