There has multiple report layout in the dropdown list.
User will choose which report they want to review and then click the button, the report only show.
If user want to change another report to review, they will re-select the report name from the dropdown list.
However, the report will directly display without clicking the button.
So, how can force the user MUST click the button if change value in dropdown list to display the new reort?
code
@callback(
Output('table_content_analysis', 'children'),
Input('search-button', 'n_clicks'),
Input('report_name_dd', 'value'),
prevent_initial_call=True
)
def update_analysis_table( n_clicks, value):
if n_clicks is None:
return dash.no_update
if n_clicks > 0:
if value == 'report1':
return layout_1()
elif value == 'report2':
return layout_2()
elif value == 'report3':
return layout_3()
elif value == 'report4':
return layout_4()
elif value == 'report5':
return layout_5()
else:
return None
return None