diff --git a/src/BlazorTable.Sample.Shared/Bugs/135.razor b/src/BlazorTable.Sample.Shared/Bugs/135.razor new file mode 100644 index 00000000..9087a72a --- /dev/null +++ b/src/BlazorTable.Sample.Shared/Bugs/135.razor @@ -0,0 +1,33 @@ +@page "/135" + +@using BlazorTable + + + + + + +
+ +@code +{ + private PersonData[] data; + + protected override async Task OnInitializedAsync() + { + data = new PersonData[] + { + new PersonData() + { + ShortId = 5 + } + }; + } + + public class PersonData + { + public int ShortId { get; set; } + } +} \ No newline at end of file diff --git a/src/BlazorTable.Tests/BlazorTable.Tests.csproj b/src/BlazorTable.Tests/BlazorTable.Tests.csproj index 07f7eeb1..c24e25f3 100644 --- a/src/BlazorTable.Tests/BlazorTable.Tests.csproj +++ b/src/BlazorTable.Tests/BlazorTable.Tests.csproj @@ -12,11 +12,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorTable/Components/Table.razor.cs b/src/BlazorTable/Components/Table.razor.cs index 235b505c..43e2cf03 100644 --- a/src/BlazorTable/Components/Table.razor.cs +++ b/src/BlazorTable/Components/Table.razor.cs @@ -423,7 +423,7 @@ private Expression> GlobalSearchQuery(string value) { Expression> tmp = null; - foreach (var column in Columns) + foreach (var column in Columns.Where(x => x.Field != null)) { var newQuery = Expression.Lambda>( Expression.AndAlso(