Sharing data between multi-tabs

Hello everyone, I wanna to ask a question about “sharing data between tabs”.
Like in tab1, I have a RadioItems and I want to share the answer with tab2 with the same thing. So, is it possible that the variable is always the same choice in tab1 and tab2? Treated as a global variable or “dcc.Store” or by the other ways?
Thx a lot for your time in advance. I will be so grateful if you’ll give me an example.

image

I don’t have a specific example for you, but I can point you to some references in the official documentation that might help.

The following is about syncing a slider and text input; however, you could easily change this to be each radioitem in tab1 and tab2.
Synchronizing a slider with a text input

You might also consider using Pattern matching callbacks. You could use ALL as the input and the output to set all instances of your radio items to the same value.
Pattern matching callbacks

I personally would probably go with the Pattern Matching Callback option, but it would be a good learning experience to try both and see what works best for you.

1 Like