ExpansionPanelListChangeEvent
Inherits: Event['ExpansionPanelList']
Payload for ExpansionPanelList.on_change event.
Properties
-
expanded(bool) –Whether the toggled panel is expanded (
True) or -
index(int) –The index of the panel in
ExpansionPanelList.controlsthat was toggled.
Properties#
expanded
instance-attribute
#
expanded: bool
Whether the toggled panel is expanded (True) or
collapsed (False) after the event.
index
instance-attribute
#
index: int
The index of the panel in ExpansionPanelList.controls that was toggled.
Panels with visible set to False are not counted/indexed.
This means the value may differ from the panel's position in the original
ExpansionPanelList.controls list when some panels are invisible.
To map it back, filter ExpansionPanelList.controls to only visible
panels and use this index on that filtered list.