Layout > Icon Sidebar example not reacting to user input

Im using a .net 8 blazor project and inserting the demo code from Blazor Layout Component | Free UI Components by Radzen into my project. I have followed all of the installation and setup, and other components are working correctly, however the sidebar with icons is not. The menu is rendered correctly however clicking on the hamburger icon or the nav items, nothing happens. No errors are displayed in Dev tools.

I also added InteractiveServer to the page but no luck.

Please help

Hi @Ian_Morris,

Layouts are not interactive by default. You need to enable interactivity for the components you want to be interactive.

@korchev I have broken the sidebar and header out into there own files and tried to add interactivity to it, but no luck. When I add it to Sidebar I get the following message: InvalidOperationException: Cannot pass the parameter 'ChildContent' to component 'RadzenHeader' with rendermode 'InteractiveServerRenderMode'. This is because the parameter is of the delegate type 'Microsoft.AspNetCore.Components.RenderFragment', which is arbitrary code and cannot be serialized.

Microsoft.AspNetCore.Components.Endpoints.SSRRenderModeBoundary.ValidateParameters(IReadOnlyDictionary<string, object> latestParameters)

I have also tried the other render modes as well.

You should move those to another component which can have its render mode set appropriately. Check the Blazor documentation about render modes. You can also check this thread: Sidebar not working in .NET 8 RC1 experiment - #13 by korchev

@korchev figured it out, works great now. Moved header and sidebar into its own file and the added @rendermode InteractiveServer above tags, and rmoving and inline references from it.

Thanks!