I want DataTable under a tab. In below sample, callback is called and i am see the print msg.
working sample:
stab_sus_list=html.Div([
Preformatted text
html.H2(“List of suspects”),
html.Div(id=‘test’)
],id=‘sus_list’)
@app.callback(dash.dependencies.Output(‘sus_display’,‘data’),
[dash.dependencies.Input(‘susList’,‘value’)]
)
def displayContent(value):
print(“sus tab touched”)
dataframe=pandas.read_csv(‘suspect.cvs’)
return dataframe.to_dict(“rows”)
In below sample, even though i opened the ‘susList’ tab the callback is not getting called.
not working sample:
stab_sus_list= html.H2([
html.H3(“List of suspects”),
dash_table.DataTable(
id=“sus_display”,
columns=suspectsCol
)
],id=‘susList’)
@app.callback(dash.dependencies.Output(‘sus_display’,‘data’),
[dash.dependencies.Input(‘susList’,‘value’)]
)
def displayContent(value):
print(“sus tab touched”)
dataframe=pandas.read_csv(‘suspect.cvs’)
return dataframe.to_dict(“rows”
indent preformatted text by 4 spaces