Grid fix null exception on ItemsToShow

This commit is contained in:
markosteger 2023-03-17 14:47:43 +01:00
parent 5f8215c5c5
commit abcdb71bda

View File

@ -9,9 +9,9 @@ public partial class Grid<DataType> : ComponentBase
{ {
[Parameter] [Parameter]
public ObservableCollection<DataType>? Items { get; set; } public ObservableCollection<DataType>? Items { get; set; } = new();
private List<DataType>? ItemsToShow { get; set; } private List<DataType>? ItemsToShow { get; set; } = new();
[Parameter] [Parameter]
public RenderFragment<DataType>? RowTemplate { get; set; } public RenderFragment<DataType>? RowTemplate { get; set; }