I am having a problem with the response of dash_table.DataTable
toggle columns button that is not functioning as intended.
In layout I define:
dbc.Card(dbc.CardBody(id="table_output")
In callback the output is:
Output("table_output", "children"),
and I return
table = dash_table.DataTable(
data=df.to_dict("records"),
columns=[{"name": column_display_names.get(i, i), "id": i} for i in df.columns[:14]],
hidden_columns = [col for col in method_cols_extended if col not in method_cols],
I can see each of my columns without using hidden_columns
feature.
After using hidden_columns
the intended columns in fact get hidden and Toggle column button appears, however clicking it, does nothing. Manually defining hidden_columns does not make button functional as well.
Is the problem because I return the table in callback? Do I need to include other input for toggle button in this case, what is the id of the button?