forked from IvanJosipovic/BlazorTable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suggested alternative ITable interface approach so content components…
… do not need to specify the parent table type
- Loading branch information
1 parent
191d481
commit 7933d5c
Showing
12 changed files
with
76 additions
and
54 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
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
@namespace BlazorTable | ||
@typeparam TableItem |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
@namespace BlazorTable | ||
@typeparam TableItem | ||
|
||
@if (AlwaysShow || (Table.TotalPages >= 1)) | ||
{ | ||
|
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,49 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Linq.Expressions; | ||
|
||
namespace BlazorTable | ||
{ | ||
/// <summary> | ||
/// BlazorTable Interface (type-specific) | ||
/// </summary> | ||
/// <typeparam name="TableItem">The row data type</typeparam> | ||
/// <remarks> | ||
/// All row-type specific methods are defined in this interface | ||
/// </remarks> | ||
public interface ITable<TableItem> : ITable | ||
{ | ||
/// <summary> | ||
/// List of All Available Columns | ||
/// </summary> | ||
List<IColumn<TableItem>> Columns { get; } | ||
|
||
/// <summary> | ||
/// Optional: expression to use for row class | ||
/// </summary> | ||
Expression<Func<TableItem, string>> TableRowClass { get; set; } | ||
|
||
/// <summary> | ||
/// Adds a Column to the Table | ||
/// </summary> | ||
/// <param name="column"></param> | ||
void AddColumn(IColumn<TableItem> column); | ||
|
||
/// <summary> | ||
/// Removes a Column from the Table | ||
/// </summary> | ||
/// <param name="column"></param> | ||
void RemoveColumn(IColumn<TableItem> column); | ||
|
||
/// <summary> | ||
/// IQueryable data source to display in the table | ||
/// </summary> | ||
IQueryable<TableItem> ItemsQueryable { get; set; } | ||
|
||
/// <summary> | ||
/// Collection to display in the table | ||
/// </summary> | ||
IEnumerable<TableItem> Items { get; set; } | ||
} | ||
} |