Skip to content

Commit

Permalink
fix bug in bs4 side nav
Browse files Browse the repository at this point in the history
  • Loading branch information
joeaudette committed May 14, 2018
1 parent d5e2778 commit 7920810
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cloudscribe.Web.Navigation/NavigationViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public TreeNode<NavigationNode> StartingNode
{
if (startingNode == null)
{
if (startingNodeKey.Length > 0 && startingNodeKey != "RootNode")
if (!string.IsNullOrWhiteSpace(startingNodeKey) && startingNodeKey != "RootNode")
{
startingNode = RootNode.FindByKey(startingNodeKey);
if (startingNode == null)
Expand Down Expand Up @@ -306,7 +306,7 @@ private bool IsAllowedByAdjuster(TreeNode<NavigationNode> node)
private bool FilterIsAllowed(TreeNode<NavigationNode> node)
{
if (string.IsNullOrEmpty(node.Value.ComponentVisibility)) { return true; }
if (navigationFilterName.Length == 0) { return false; }
if (string.IsNullOrWhiteSpace(navigationFilterName)) { return false; }
if (node.Value.ComponentVisibility.Contains(navigationFilterName)) { return true; }

return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@Html.Raw(Model.GetIcon(childNode.Value))@childNode.Value.Text
</a>
@Model.UpdateTempNode(childNode)
@Html.Partial("SideNavPartial", Model) @* recursion *@
@Html.Partial("Bs4SideNavPartial", Model) @* recursion *@
</li>
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<li class="nav-item">
<a class="nav-link active" href="@Url.Content(Model.AdjustUrl(node))">@Html.Raw(Model.GetIcon(node.Value))@Model.AdjustText(node)</a>
@Model.UpdateTempNode(node)
@Html.Partial("SideNavPartial", Model)
@Html.Partial("Bs4SideNavPartial", Model)
</li>
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<Description>an ASP.NET Core viewcomponent for menus and breadcrumbs</Description>
<VersionPrefix>2.0.10</VersionPrefix>
<AssemblyVersion>2.0.10</AssemblyVersion>
<VersionPrefix>2.0.11</VersionPrefix>
<AssemblyVersion>2.0.11</AssemblyVersion>
<Authors>Joe Audette</Authors>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyName>cloudscribe.Web.Navigation</AssemblyName>
Expand Down

0 comments on commit 7920810

Please sign in to comment.