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

Sharing Data between Callbacks with Hidden Div

$
0
0

@anna-maria wrote:

Hey Dash Community,

I’m wondering if it’s possible to share Data with a hidden Div and use this one in another callback additionally to other Input Values. I’ve just seen examples where the Input value was just the hidden Div Input and no more other Inputs.
Here’s an example:

@app.callback(Output('intermediate-value', 'children'), [Input('dropdown', 'value'), Input('filter2', 'value'), Input('filter3', 'value')])
def getFilterData:
      ...
      return json.dumps(data)

@app.callback(Output('dataTableContainer', 'children'), [Input('intermediate-value', 'children')])
def generateDataTable: 
    ....
    return dataTable


@app.callback(Output('DetailsTableContainer', 'children'), [Input('intermediate-value', 'children'),
Input('datatable', "derived_virtual_data"),
     Input('datatable', "derived_virtual_selected_rows")])
def generateDetailsTable:
    ....
    return DetailsTable

Every answer is appreciated.
Thank you and merry christmas.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles