✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

How to abort callbacks?

Hi everyone,

I am developing a multi-page app in which I have a homepage and from there you can go to few different pages.
When I move to one of these pages I have a callback that is fired and shows some plots. In all these pages I also have a link to go back to the homepage.

Now consider I have entered in one page and I immediately click on the home button/link. In this case I do not want the plots to be generated and I want to abort the “plotting callback”. However, I do not know how to do that.

I am thinking about a callback for the home link that when is clicked it does something, but I am not sure what it should do. How do I say “abort all the callbacks currently running?”.

Any help on this?

Thank you all!

1 Like