Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Datatable derived_virtual_data and dcc.loading creates infinite loop

$
0
0

@ezras wrote:

Hi all. I’m writing a dash app, where i’ve got a callback that looks like:

@app.callback(Output(figure_id, 'figure'),
              [Input(datatable_id, 'derived_virtual_data')])
def my_callback(data):

The callback basically updates a map when data in my datatable is changed, filtered, etc., and it works beautifully.

The issue is that if I wrap the div containing my datatable and figure in a dcc.Loading(id="loading_id", children=[ div that contains my datatable and figure ]) my app enters an infinite loop of switching between displaying the Loading animation and refreshing my table and figure.

If I change derived_virtual_data in the callback to just data, the Loading animation works as intended, but of course, I then lose the ability to refresh things based on the table being filtered, etc so that’s not really an option.

Anyone know why this is happening or how to avoid it?

Thanks,
-Ezra

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles