Skip to content

Commit

Permalink
Fixed: When DefaultShown = true, BSCollapse can't be closed (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
EMaderbacher authored Nov 19, 2024
1 parent 1eaaefc commit 3f19870
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/BlazorStrap/Shared/Components/Common/BSCollapseBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@ public abstract class BSCollapseBase : BlazorStrapToggleBase<BSCollapseBase>, IA
public bool DefaultShown
{
get => _defaultShown;
set { _defaultShown = value; if (!_hasRendered) Shown = value; }
set
{
_defaultShown = value;
if (!_hasRendered)
{
Shown = value;
_shown = value;
}
}
}

/// <summary>
Expand Down

0 comments on commit 3f19870

Please sign in to comment.