Open franky1017 opened 3 months ago
Yes, it is not there by design.
@franky1017 What would you like to achieve with HxSidebarItem.OnClick
?
I am using the sidebar as a list and when clicking on it, the right panel would show details of the item.
I’ve switched to use list but I just love the look and feel of the sidebar with auto hide and mobile menu features.
On Mon, Jun 24, 2024 at 4:45 AM Robert Haken @.***> wrote:
@franky1017 https://github.com/franky1017 What would you like to achieve with HxSidebarItem.OnClick?
— Reply to this email directly, view it on GitHub https://github.com/havit/Havit.Blazor/issues/837#issuecomment-2185946302, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJETLLL7QHWZ3JDWWXQWOI3ZI7MEHAVCNFSM6AAAAABJVUMLRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBVHE2DMMZQGI . You are receiving this because you were mentioned.Message ID: <havit/Havit .@.***>
Although I understand your scenario, the HxSidebar
is still a very specific and complex component designed solely for the main navigation of the entire application. There are many other issues you might encounter if you try to use it differently.
I’ll take your feedback into account if we decide to do a major overhaul of the sidebar component.
In the end, we decided to reconsider the original approach. For advanced scenarios where specific logic is needed in the OnClick
event, we will add new parameters to HxSidebarItem
:
OnClick
OnClickPreventDefault
OnClickStopPropagation
Hopefully, this won't cause more confusion than it brings utility.
I am using the HxSidebar component and instead of linking to a page, I would like to set the OnClick event of the HxSidebarItem. But I was not able to find such event. Is this by design?