How to preserve last state in Tabs?

Lets say, I have a dash app layout with 2 tabs. Each tab has a callback associated with an input.
At first, I navigated to tab-1 and provided an input to draw a table/graph. Now, when I switched to another tab (tab-2), I provided another input which is on the layout of that tab to get another table/graph. But when I switch back to tab-1, the previous state of tab-1 is lost and I need to provide input again. Can we have preserve last states in dcc.Tabs so that until the input is passed explicitly and the callback returns a new output, the last state/output is displayed until then.


That should work automatically when you use the second method on this page (at least for me):

Method 2. Content as Tab Children (

1 Like

In method-2, the tab layouts are fixed. But, I have a input component on each tab, so as soon I swap the tabs the previous content is cleared to get a new input from the user for a callback function.

1 Like

Hi, I have the same question. Has anyone been able to provide a good way to load Input or other component values from a data Store? Thanks!