fix: move _toggle_offcanvas callback to _compte_shell.py
The callback was defined in compte_admin.py but controlled components (compte-offcanvas and compte-offcanvas-open) rendered by account_shell() in _compte_shell.py. Moving the callback to where the components live improves code organization and reduces coupling. Closes #73 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -206,13 +206,3 @@ def layout(
|
||||
)
|
||||
def _toggle_delete_modal(_open, _cancel, is_open):
|
||||
return not is_open
|
||||
|
||||
|
||||
@callback(
|
||||
Output("compte-offcanvas", "is_open"),
|
||||
Input("compte-offcanvas-open", "n_clicks"),
|
||||
State("compte-offcanvas", "is_open"),
|
||||
prevent_initial_call=True,
|
||||
)
|
||||
def _toggle_offcanvas(_n, is_open):
|
||||
return not is_open
|
||||
|
||||
Reference in New Issue
Block a user