To replicate:
1. Copy the sample code from https://blazor.syncfusion.com/documentation/datagrid/row/#detail-template
2. Modify Enumerable.Range(1, 9) to Enumerable.Range(1, 1) so that there's only 1 row / entry
3. Expand the DetailTemplate. Expansion succeeds.
4. Collapse the DetailTemplate. Collapse fails and the following message is printed out on the logs:
blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Nullable object must have a value.
System.InvalidOperationException: Nullable object must have a value.
at System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].get_Value()
at Syncfusion.Blazor.Grids.Internal.Selection`1.<ClearRowSelection>d__42[[YfcApp.Pages.Index.EmployeeData, YfcApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Syncfusion.Blazor.Grids.Internal.Selection`1.<RowSelectionClickHandler>d__38[[YfcApp.Pages.Index.EmployeeData, YfcApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Syncfusion.Blazor.Grids.Internal.Selection`1.<ClickHandler>d__35[[YfcApp.Pages.Index.EmployeeData, YfcApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Syncfusion.Blazor.Grids.Internal.GridCellBase`1.<CellClickHandler>d__36[[YfcApp.Pages.Index.EmployeeData, YfcApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Syncfusion.Blazor.Grids.Internal.DetailCell`1.<<BuildRenderTree>b__0_0>d[[YfcApp.Pages.Index.EmployeeData, YfcApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)