Panelmenu not selected path with routing and params

Hello

I have a problem, I understood that in my Sidebar the selection (blue bar on the left indicating our location in the menu) of the current page is made by the path parameter. Ex: /counter.

And I'm looking for a way that some parameters are taken into account. Ex: /{staff}/counter/{id}

If someone could help me please?

Hi @Violatiss,

This is currently not supported. The full URL is tested. You can probably use custom implementation and set the Selected property of your item accordingly. Here is how the current one works: https://github.com/radzenhq/radzen-blazor/blob/master/Radzen.Blazor/RadzenPanelMenu.razor.cs#L66

Hello

Thank you for your feedback.
I will try to find a solution.

If I find one I will post the code for those interested.

Hello

So I used the Radzen folder and added the project. I modified the file.
(option github : Manually edit the .csproj file and add a project reference)

And modify the code as below :

bool ShouldMatch(string url)
        {
            if (string.IsNullOrEmpty(url))
            {
                return false;
            }

            var currentAbsoluteUrl = UriHelper.ToAbsoluteUri(UriHelper.Uri).AbsoluteUri;

            var currentAbsoluteUrlUpdate = currentAbsoluteUrl;
            int IfParamExist = currentAbsoluteUrlUpdate.IndexOf("?");
            if(IfParamExist != -1)
            {
                currentAbsoluteUrlUpdate = currentAbsoluteUrlUpdate.Substring(0, IfParamExist);
            }

            var absoluteUrl = UriHelper.ToAbsoluteUri(url).AbsoluteUri;

            return string.Equals(currentAbsoluteUrlUpdate, absoluteUrl, StringComparison.OrdinalIgnoreCase);
        }