Skip to main content

ExpansionPanelListChangeEvent

Payload for flet.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 flet.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 flet.ExpansionPanelList.controls list when some panels are invisible. To map it back, filter flet.ExpansionPanelList.controls to only visible panels and use this index on that filtered list.