Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Fix Bug #135 (#137) #patch
Browse files Browse the repository at this point in the history
Fix Bug #135
NuGet update
  • Loading branch information
IvanJosipovic authored Jun 4, 2020
1 parent 8829dee commit 626a154
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
33 changes: 33 additions & 0 deletions src/BlazorTable.Sample.Shared/Bugs/135.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@page "/135"

@using BlazorTable

<Table TableItem="PersonData" Items="data" ShowSearchBar="true">
<Column TableItem="PersonData" Title="Id" Field="@(x => x.ShortId)" Sortable="false" Filterable="true" />
<Column TableItem="PersonData" Title="Request" Sortable="false" Filterable="false">
<Template>
<button>RQ</button>
</Template>
</Column>
</Table>

@code
{
private PersonData[] data;

protected override async Task OnInitializedAsync()
{
data = new PersonData[]
{
new PersonData()
{
ShortId = 5
}
};
}

public class PersonData
{
public int ShortId { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/BlazorTable.Tests/BlazorTable.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<PackageReference Include="PuppeteerSharp.Contrib.Extensions" Version="2.0.0" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.2.1">
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion src/BlazorTable/Components/Table.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ private Expression<Func<TableItem, bool>> GlobalSearchQuery(string value)
{
Expression<Func<TableItem, bool>> tmp = null;

foreach (var column in Columns)
foreach (var column in Columns.Where(x => x.Field != null))
{
var newQuery = Expression.Lambda<Func<TableItem, bool>>(
Expression.AndAlso(
Expand Down

0 comments on commit 626a154

Please sign in to comment.