I have a multi-tab dash application. One of the tabs has a dcc.Interval that should allow to trigger a callback after every 2mn to update a table.
html.Div([
drc.Card([
html.P(
children='Daily Negative Client Flow',
style={'textAlign': 'center', 'width': '105%', 'color': 'red', 'font-weight': 'bold'}
),
html.Div(
id='inception-last-ts-id',
style={'width': '98%', 'margin': 5, 'textAlign': 'left'}
),
dcc.Interval(id='interval-update',interval=2 *60 * 1000, n_intervals=0),
table,
], style={"min-height": "auto!important", "z-index": "inherit !important", "overflow": "visible !important"})
])
@app.callback(
[Output('monitoring-inception-pl', 'data'), Output('inception-last-ts-id', 'children'), Output('monitoring-tab-id', 'style')],
[Input('interval-update', 'n_intervals')]
)
def updateTable(interval):
...
If this tab is selected, the interval updates works as expected. But if another tab in the application is selected, then no callbacks will be fired on the "updateTable" above.
Is there a way to handle this in dash ?