This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Global Search Updated to .Net Core 3.1.3 Updated Sample to Blazor 3.2.0 Preview 3
- Loading branch information
1 parent
01f77cf
commit d3516d9
Showing
19 changed files
with
163 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ extraction: | |
csharp: | ||
index: | ||
dotnet: | ||
version: "3.1.102" | ||
version: "3.1.201" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
@page "/GlobalSearch" | ||
|
||
@using BlazorTable | ||
|
||
<h1>Global Search</h1> | ||
|
||
Search: <input type="text" class="form-controls" value="@Table?.GlobalSearch" @onchange="@(x => Table.GlobalSearch = x.Value.ToString())" /> | ||
|
||
<Table TableItem="PersonData" Items="data" PageSize="15" ColumnReorder="true" @ref="Table"> | ||
<Column TableItem="PersonData" Title="Id" Field="@(x => x.id)" Sortable="true" Filterable="true" Width="10%" DefaultSortColumn="true" /> | ||
<Column TableItem="PersonData" Title="Full Name" Field="@(x => x.full_name)" Sortable="true" Filterable="true" Width="20%" /> | ||
<Column TableItem="PersonData" Title="Email" Field="@(x => x.email)" Sortable="true" Filterable="true" Width="20%"> | ||
<Template> | ||
<a href="mailto:@context.email">@context.email</a> | ||
</Template> | ||
</Column> | ||
<Column TableItem="PersonData" Title="Paid" Field="@(x => x.paid)" Sortable="true" Filterable="true" Width="10%"> | ||
<Template> | ||
@context.paid.ToString() | ||
</Template> | ||
</Column> | ||
<Column TableItem="PersonData" Title="Price" Field="@(x => x.price)" Sortable="true" Filterable="true" Width="10%" Format="C" Align="Align.Right" /> | ||
<Column TableItem="PersonData" Title="Created Date" Field="@(x => x.created_date)" Sortable="true" Filterable="true" Width="10%"> | ||
<Template> | ||
@(context.created_date.HasValue ? context.created_date.Value.ToShortDateString() : string.Empty) | ||
</Template> | ||
</Column> | ||
<Column TableItem="PersonData" Title="Enum" Field="@(x => x.cc_type)" Sortable="true" Filterable="true" Width="10%"> | ||
<Template> | ||
@context.cc_type | ||
</Template> | ||
</Column> | ||
<Pager ShowPageNumber="true" ShowTotalCount="true" /> | ||
</Table> | ||
|
||
@code | ||
{ | ||
[Inject] | ||
private HttpClient Http { get; set; } | ||
|
||
private ITable<PersonData> Table; | ||
|
||
private PersonData[] data; | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
data = await Http.GetFromJsonAsync<PersonData[]>("sample-data/MOCK_DATA.json"); | ||
|
||
|
||
Console.WriteLine($"{"Astrix Mariette".IndexOf("Astrix")}"); | ||
} | ||
|
||
public class PersonData | ||
{ | ||
public int? id { get; set; } | ||
public string full_name { get; set; } | ||
public string email { get; set; } | ||
public bool? paid { get; set; } | ||
public decimal? price { get; set; } | ||
public CreditCard? cc_type { get; set; } | ||
public DateTime? created_date { get; set; } | ||
} | ||
|
||
public enum CreditCard | ||
{ | ||
none = 0, | ||
[Description("MasterCard")] | ||
MasterCard = 1, | ||
Visa = 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters