hello everybody
in my app im using a switch to hide and show certain components using {"display:" "block"}
,
i have two datatables that get initialized on start, one is shown and the other one is not,
when i toggle my switch the other datatable shows up with the correct columns, but no data is shown
my switch callback
@callback(Output('range-dt', 'style'),
Output('daily-dt', 'style'),
Input("daily-switch", "value"),
)
def daily_or_range(button):
if button:
return {"display": "block"}, {"display": "None"}
return {"display": "None"}, {"display": "block"}
when i manually set everything to {"display:" "block"}
everything works as expected
but when i use the swtich, the datatable that has {"display:" "none"}
wont show any data after i trigger the switch
i also have done the same thing for graphs, and they work perfectly, i’m only having this problem on DataTables
p.n: i use a cardBody to contain the datatable, and thats where i output my “style” to