I built a Dash with graph, range slider and DataTable…, every callbacks work fine, but the @callback for DataTable does not have response, seems not being reached:
dbc.Col(dt.DataTable(id="table_selected_buses",
columns=[{"name": i, "id": i} for i in ['Bus Name', 'Bus ID', 'Gas', 'Nulear',
'Coal', 'PV', 'RTPV', 'Wind',
'Hydro', 'CSP', 'Total', ]
],
data=[{}],
style_as_list_view=True,
style_header=table_header_style,
page_size=8,
)
),
@app.callback(
Output(‘table_selected_buses’, ‘data’),
[Input(‘day-range3,’, ‘day’)])
def update_table(dayrange):
print(dayrange)
df2=dfbusload.head(10)
print(df2)
return df2.to_dict(‘records’)
both prints here are for testing, nothing printed out. I have update all Dashes to current.
Thank you for your help.
Pengchu