Merge pull request #1107 from leigh-pointer/dev

#1106 Fix issue where Section would not initialize Expanded.
This commit is contained in:
Shaun Walker 2021-02-14 15:03:09 -05:00 committed by GitHub
commit a50363fec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,13 +16,14 @@
<div class="d-flex">
<hr class="app-rule" />
</div>
<div class="collapse" id="@Name">
<div class="collapse @_show" id="@Name">
@ChildContent
</div>
@code {
private string _heading = string.Empty;
private string _expanded = string.Empty;
private string _show = string.Empty;
[Parameter]
public RenderFragment ChildContent { get; set; }
@ -40,6 +41,7 @@
{
_heading = (!string.IsNullOrEmpty(Heading)) ? Heading : Name;
_expanded = (!string.IsNullOrEmpty(Expanded)) ? Expanded : "false";
if (_expanded == "true") { _show = "show"; }
}
protected override void OnParametersSet()