File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1515from .css ._css_unit import CssUnit , as_css_unit
1616
1717if TYPE_CHECKING :
18- from ..session import Session
1918 from ..express ._recall_context import RecallContextManager
19+ from ..session import Session
2020
2121__all__ = (
2222 "accordion" ,
@@ -487,16 +487,17 @@ def insert_accordion_panel(
487487 if position not in ("after" , "before" ):
488488 raise ValueError ("`position` must be either 'after' or 'before'" )
489489 session = require_active_session (session )
490-
490+
491491 # Handle both AccordionPanel and RecallContextManager[AccordionPanel]
492492 from ..express ._recall_context import RecallContextManager
493+
493494 if isinstance (panel , RecallContextManager ):
494495 # This is a RecallContextManager, extract the AccordionPanel
495496 accordion_panel = panel .fn (* panel .args , ** panel .kwargs )
496497 else :
497498 # This is already an AccordionPanel
498499 accordion_panel = panel
499-
500+
500501 # Add accordion ID to panel; Used when `accordion(multiple=False)`
501502 accordion_panel ._accordion_id = id
502503
You can’t perform that action at this time.
0 commit comments