Controlled Mode

By default, the PanelBar is in an uncontrolled state.

To manage the state of the PanelBar:

  • Set the isControlled property to true in order to enter the controlled mode first.
  • Set the expanded property to the expanded items value.
  • Handle the onSelect event.
  • Set the new value trough the props.
Example
View Source
Change Theme:

Control All PanelBarItems And Use Unique Item Id

The following example demonstrates how to collapse and expand all PanelBar items while controlling the state and implementing own unique ids for each PanelBar item.

Example
View Source
Change Theme:

In this article

Not finding the help you need?