Skip to main content

ExpansionPanelListChangeEvent

Payload for ExpansionPanelList.on_change event.

Inherits: Event

Properties

Properties

expandedinstance-attribute

expanded: bool

Whether the toggled panel is expanded (True) or collapsed (False) after the event.

indexinstance-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.