Usage of the same output/ouputs in different callbacks

hello community,

similar questions were already asked and I could not filter a clear answer consequently a solution.

  • Is it possible to use the same output/outputs in different callbacks?

Thanks in advance!

The short answer is no. Here’s a thread that should help provide some clarity on the issue.

1 Like

cry cry :scream:

thanks for answering

1 Like

As others have noted, it is not possible. I wrote some code that can hide it some time ago. You can try it out, if you like,

1 Like

I added the DashCallbackBlueprint class to my project and tried out your example, it works!

Could you write how you solved it and whether it was tested considerably, thank a lot!

When you register a DashCallbackBlueprint on the Dash app, all callbacks in the blueprint that target the same output are merged into a single callback, which is then registered on the Dash app. I haven’t tested it extensively, but i have used it in a few projects with success.

One drawback is that if you register many callbacks in the same blueprint, the resulting callback might end up with circular dependencies (which will raise an error). In most cases, it can be resolved by creating multiple blueprints though :slight_smile:

1 Like