Is it possible to make all tabs loaded and not reload the tab in dcc.Tabs?

Hi guys!
So I was wondering, is it possible to leave the tabs loaded even while moving between the tabs?

it’s useful when you have a tab for overview and a tab for drill-down and the graphs in both the tabs communicate with each other so you would want them to stay loaded for filtering and such.

Hi Matan,

It really depends on how you load the data inside the tabs. What helped me understand this is the Dash Mantine Components documentation about Tabs:

You can return the content of a tab with a callback or directly as a children. The first option means that the data inside a tab is loaded once the tab is opened - so not the solution you want.

Therefore, go for the 2nd option and load the data as children. You can still have callbacks that change your graphs, but they don’t reload the whole tabs but just the graphs.

2 Likes

Hi! thanks for replaying :smile:
I just found out about it and I am in the middle of checking if it answers my needs!
Thanks for the advice!