havit / Havit.Blazor

Free Bootstrap 5 components for ASP.NET Blazor + optional enterprise-level stack for Blazor development (gRPC code-first, layered architecture, localization, auth, ...)
https://havit.blazor.eu
MIT License
486 stars 67 forks source link

[HxSidebarItem] Allow navigation on expandable items #812

Closed crdo closed 4 months ago

crdo commented 4 months ago

In some rare cases, after clicking on parent SidebarItem, we need to do navigation + expanding child nodes. In Bootstrap, handling of href on parent a is prevented, so I suggest to add OnClick parameter as a work-around.

hakenr commented 4 months ago

@crdo Instead of OnClick (extending the API and allowing all the possible misinterpretations of the behavior), I tried to make the Href link work by executing the navigation action manually when needed.

I will publish the proposed solution in a Havit.Blazor prerelease and let's give it a try.