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

Added sample to reproduce issue 157 #160

Merged
merged 1 commit into from
Aug 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions src/BlazorTable.Sample.Shared/Bugs/157.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@page "/157"

@using BlazorTable

<Table TableItem="MyData"
Items="data">
<Column TableItem="MyData" Title="MyString" Field="@(d => d.MyString)" Sortable="true" Filterable="true" />
<Column TableItem="MyData" Title="MyInt" Field="@(d => d.MyInt)" Sortable="true" Filterable="true" />
<Column TableItem="MyData" Title="MyEnum" Field="@(d => d.MyEnum)" Sortable="true" Filterable="true" />
</Table>


@code {
private List<MyData> data;

protected override void OnInitialized()
{
data = new List<MyData>()
{
new MyData()
{
MyString = "One",
MyInt = 1,
MyEnum = MyEnum.One
},
new MyData()
{
MyString = "Two",
MyInt = 2,
MyEnum = MyEnum.Two
},
new MyData()
{
MyString = "Three",
MyInt = 3,
MyEnum = MyEnum.Three
}
};


base.OnInitialized();
}
public enum MyEnum
{
One,
Two,
Three
}

public class MyData
{
public string MyString { get; set; }
public int MyInt { get; set; }
public MyEnum MyEnum { get; set; }
}
}