RadzenPanelMenuItem does not respect/override Match NavLinkMatch.All #1355

Closed
opened 2026-01-29 17:52:31 +00:00 by claunia · 1 comment
Owner

Originally created by @xXBuilderBXx on GitHub (Aug 20, 2024).

Describe the bug
RadzenPanelMenuItem does not respect Match NavLinkMatch.All unless you set the main RadzenPanelMenu to NavLinkMatch.All which seems like it should override it?
Using latest version 5.1.1

To Reproduce
Steps to reproduce the behavior:

  1. Create a menu item with.
<RadzenPanelMenu>
    <RadzenPanelMenuItem Path="/test" Match="NavLinkMatch.All" Text="Test Page" />
</RadzenPanelMenu>
  1. Load a page with the path /test/website /test/name ( Not /test )
  2. Menu item seems to be showing as active when it should not be.

Expected behavior
The nav link should only match All of the path which is /test

Weird Fix
In theory PanelMenuItem should be overriding the main PanelMenu for matching but looks like setting Match="NavLinkMatch.All" on PanelMenu sort of fixes this issue but not sure if NavLinkMatch.Prefix will work on PanelMenuItem.

<RadzenPanelMenu Match="NavLinkMatch.All">
    <RadzenPanelMenuItem Path="/test" Match="NavLinkMatch.All" Text="Test Page" />
</RadzenPanelMenu>
Originally created by @xXBuilderBXx on GitHub (Aug 20, 2024). **Describe the bug** RadzenPanelMenuItem does not respect Match NavLinkMatch.All unless you set the main RadzenPanelMenu to NavLinkMatch.All which seems like it should override it? Using latest version 5.1.1 **To Reproduce** Steps to reproduce the behavior: 1. Create a menu item with. ```html <RadzenPanelMenu> <RadzenPanelMenuItem Path="/test" Match="NavLinkMatch.All" Text="Test Page" /> </RadzenPanelMenu> ``` 2. Load a page with the path /test/website /test/name ( Not /test ) 3. Menu item seems to be showing as active when it should not be. **Expected behavior** The nav link should only match All of the path which is /test **Weird Fix** In theory PanelMenuItem should be overriding the main PanelMenu for matching but looks like setting Match="NavLinkMatch.All" on PanelMenu sort of fixes this issue but not sure if NavLinkMatch.Prefix will work on PanelMenuItem. ```html <RadzenPanelMenu Match="NavLinkMatch.All"> <RadzenPanelMenuItem Path="/test" Match="NavLinkMatch.All" Text="Test Page" /> </RadzenPanelMenu> ```
Author
Owner

@enchev commented on GitHub (Aug 20, 2024):

I've just submitted pull request with a change related to this issue. Let me know if this is what you are looking for.

@enchev commented on GitHub (Aug 20, 2024): I've just submitted pull request with a change related to this issue. Let me know if this is what you are looking for.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1355