Layout Not Refreshing After DCC Intervals Triggers Callback Function

I have a multi-page Dash app (Dash version 1.1.1) where one of the apps triggers a callback function every minute as such:

layout = html.Div([
    html.Div(id='table'),
    dcc.Interval(
        id='interval-component',
        interval=60*1000,
        n_intervals=0
    ),
])
@app.callback(
    Output('table', 'children'),
    [Input('interval-component', 'n_intervals')]
)
def update_tables(n):
   #some logic
   return [html.H5('As of ' + updatedTime),]

The callback is correctly triggered every minute, but the layout doesn’t update on the page. I need to refresh the page to see the update layout. How can i get the updated layout to show without requiring a refresh of the page?

1 Like