diff --git a/datadoc/frontend/components/variables_tab_cbi.py b/datadoc/frontend/components/variables_tab_cbi.py index f2810e53..dd526e26 100644 --- a/datadoc/frontend/components/variables_tab_cbi.py +++ b/datadoc/frontend/components/variables_tab_cbi.py @@ -165,6 +165,8 @@ def set_display_variables(selected_variabel: []) -> []: [Input("submit", "n_clicks")], [State("collapse", "is_open")], ) -def toggle_accordion(is_open) -> bool: # noqa: ANN001 +def toggle_accordion(n_left, is_open) -> bool: # noqa: ANN001 """Open accordion.""" + if n_left: + return not is_open return is_open