This is a migrated thread and some comments may be shown as answers.

How to use PanelBarProps expanded? string[]

1 Answer 151 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ofer
Top achievements
Rank 1
Veteran
Ofer asked on 16 May 2020, 09:21 PM

The docs and and the d file states that there is a "PanelBarProps expanded? string[]" but there is no example.

Is there a way to use this to make all PanelBarItems start expanded?

Is this for something else?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 18 May 2020, 01:37 PM

Hello, Ofer,

I can suggest checking the following example on how to set up the expanded prop:

https://www.telerik.com/kendo-react-ui/components/layout/panelbar/controlling-state/

We also have a feature logged to make this dynamic:

https://github.com/telerik/kendo-react/issues/583

Currently, it can be dynamic as well when setting the key prop of the PannelBar to the same value of the expanded property, as this will re-initialize it when the expanded state changes.

Also, if the requirement is to make them all expanded initially, this can be done by looping over all items and setting their expanded property to true.

Regards,
Stefan
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
Ofer
Top achievements
Rank 1
Veteran
Answers by
Stefan
Telerik team
Share this question
or