May 11, 2021, 9:52 AM
[CLOSED] PanelTagHelper.Collapsed doesn't work
Hello!
I'm facing a problem when I try to render an accordion's panel when the first panel needs to be collapsed.
I found the
Look at this sample:
PanelCollapsed.cshtml
Thank you
I'm facing a problem when I try to render an accordion's panel when the first panel needs to be collapsed.
I found the
collapsed
tag helper and its description make me think it is the right one, but it doesn't work.Look at this sample:
PanelCollapsed.cshtml
@page
@model ExtCookbook.Pages.PanelCollapsed
@{
}
<ext-section target="Main">
<ext-container region="Center" scrollable="true" paddingAsString="30 20 30 50" layout="Accordion">
<items>
<ext-panel title="Collapsed" collapsed="true">
<items>
<ext-button variant="Light"
scale="Medium"
marginAsString="5 0 0 0"
style="width: 100%"
text="hello"
hrefTarget=""
textAlign="Left"
iconAlign="Left"
cls="sidebar-nav-link"
iconCls="x-md save" />
</items>
</ext-panel>
<ext-panel title="Expanded" collapsed="false">
<items>
<ext-button variant="Light"
scale="Medium"
marginAsString="5 0 0 0"
style="width: 100%"
text="hello"
hrefTarget=""
textAlign="Left"
iconAlign="Left"
cls="sidebar-nav-link"
iconCls="x-md save" />
</items>
</ext-panel>
</items>
</ext-container>
</ext-section>
PanelCollapsed.cshtml.csusing Microsoft.AspNetCore.Mvc.RazorPages;
namespace ExtCookbook.Pages
{
public class PanelCollapsed : PageModel
{
public void OnGet()
{
}
}
}
Is this the correct way?Thank you