I cant get the second callback to be called, any ideas what I am missing?
# define callback
@app.callback(
Output('xml-click-data', 'children'),
Output('xml_tab', 'disabled'),
Output('all_tabs', 'value'),
[Input('table', 'active_cell'),
Input("options", "value"),
],
# (A) pass table as data input to get current value from active cell "coordinates"
[State('table', 'data')]
)
def display_xml_data(active_cell, options, data ):
global index_file_dict
div = html.Div([
html.Div( '' , style={'color': 'blue', 'fontSize': 14})] )
if active_cell is not None:
row = active_cell['row']
raw_file_name = index_file_dict[row]
div = html.Div([
html.Div(raw_file_name, style={'color': 'blue', 'fontSize': 14})])
print(options , active_cell , raw_file_name)
if 'Xml view' in options:
global strat_xml
strat_xml = get_xml_string_helper(raw_file_name)
strat_xml_list = list(strat_xml.keys())
key0 = strat_xml_list[0]
div = html.Div([
dcc.Dropdown(strat_xml_list, key0 , id={'type': 'demo-dropdown',
'index':1,
}),
html.Div(strat_xml[key0], id= {'type': 'dd-output-container',
'index': 2,
})])
return div , False ,'xml_tab'
return div , True , 'Main'
@app.callback(
Output({"type": "xdd-output-container", "index": MATCH} , 'children'),
Input({"type": "demo-dropdown", "index": MATCH} , 'value')
)
def display_xml_data_drop_down(active_cell ):
print(active_cell)
global strat_xml
return strat_xml[2]