Completed
Last Updated: 21 Apr 2020 15:27 by ADMIN
Release 2.11.0
Simon
Created on: 16 Apr 2020 08:27
Category: Menu
Type: Bug Report
1
Crashes when Menu Data is empty

If the collection you pass to the Menu Data parameter is null or empty, you will get an exception like this

System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Telerik.Blazor.Components.TelerikMenu`1.<BuildRenderTree>b__0_0(RenderTreeBuilder __builder2)
1 comment
ADMIN
Marin Bratanov
Posted on: 16 Apr 2020 08:32

For the time being, an if-block around the menu is the way to avoid the error, like you would with standard loops over data rendering plain html elements.

 

Regards,
Marin Bratanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.