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

Tag Helper - Expanded="false"

2 Answers 163 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Johannes
Top achievements
Rank 1
Veteran
Johannes asked on 11 Aug 2020, 02:13 AM

I am trying to put in a panel bar that is collapsed by default. I took the demo and changed the expanded value to false.

<kendo-panelbar name="project">
    <items>
        <panelbar-item text="Storage" expanded="false">
            <items>
                <panelbar-item text="Wall Shelving"></panelbar-item>
                <panelbar-item text="Floor Shelving"></panelbar-item>
                <panelbar-item text="Kids Storag"></panelbar-item>
            </items>
        </panelbar-item>
    </items>
</kendo-panelbar>

 

The panel bar items are collapsed but the icon is set to "k-i-arrow-60-up" so it looks like it can still be collapsed.

I am also wanting to put content other than <panelbar-item> in there, so I was going to use the <content> tag instead f the <items> tag an then put a treeview in there. When I use the <content> tag, the content is always show, so I must be using this incorrectly. I know I can do it with the html helpers, but I like how the tag helpers look. Can I still do this with the tag helpers?

2 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 13 Aug 2020, 05:48 PM

Hello ,

The behavior with the incorrect arrow being displayed when the parent item is collapsed appears to be a bug specifically of the the tag helper. I will investigate it further and most likely will log it for fixing.

As for the content of the item being always visible, this is expected. The item's content is a way to display more information or to customize the item. The PanelBar collapses and expands only child items, whereas the content is part of the item itself. It is something like the item's text, or more like an addition to the item's text, and it is always visible. So if you want to be able to expand (show) and collapse (hide) some content, it must be added to a child of a parent item.

Regards,
Ivan Danchev
Progress Telerik

0
Ivan Danchev
Telerik team
answered on 19 Aug 2020, 04:56 PM

Hello Johannes,

We've logged the issue for fixing. Here's the respective bug report item I opened on your behalf in our Feedback Portal, which you can follow for notifications on changes in the status of the issue: https://feedback.telerik.com/aspnet-core-ui/1481286-panelbar-tag-helper-displays-incorrect-icon

I've updated your Telerik points for reporting this bug.

Regards,
Ivan Danchev
Progress Telerik

Tags
PanelBar
Asked by
Johannes
Top achievements
Rank 1
Veteran
Answers by
Ivan Danchev
Telerik team
Share this question
or