diff --git a/src/BlazorTable/BlazorTable.csproj b/src/BlazorTable/BlazorTable.csproj index a85ed308..efb89e14 100644 --- a/src/BlazorTable/BlazorTable.csproj +++ b/src/BlazorTable/BlazorTable.csproj @@ -20,7 +20,7 @@ - + diff --git a/src/BlazorTable/Components/Align.cs b/src/BlazorTable/Components/Align.cs new file mode 100644 index 00000000..2a90a64a --- /dev/null +++ b/src/BlazorTable/Components/Align.cs @@ -0,0 +1,10 @@ +namespace BlazorTable +{ + public enum Align + { + None, + Left, + Center, + Right + } +} \ No newline at end of file diff --git a/src/BlazorTable/Components/Column.razor.cs b/src/BlazorTable/Components/Column.razor.cs index f2af0cfd..d9c8a8b7 100644 --- a/src/BlazorTable/Components/Column.razor.cs +++ b/src/BlazorTable/Components/Column.razor.cs @@ -38,6 +38,9 @@ public string Title [Parameter] public Expression> Field { get; set; } + + [Parameter] + public Align Align { get; set; } public Expression> Filter { get; set; } diff --git a/src/BlazorTable/Components/Table.razor b/src/BlazorTable/Components/Table.razor index de7d807e..6e821a0e 100644 --- a/src/BlazorTable/Components/Table.razor +++ b/src/BlazorTable/Components/Table.razor @@ -43,7 +43,7 @@ @foreach (IColumn column in Columns) { - + @if (IsEditMode && column.EditTemplate != null) { @column.EditTemplate(item) diff --git a/src/BlazorTable/Interfaces/IColumn.cs b/src/BlazorTable/Interfaces/IColumn.cs index 507efd52..b360f91a 100644 --- a/src/BlazorTable/Interfaces/IColumn.cs +++ b/src/BlazorTable/Interfaces/IColumn.cs @@ -92,5 +92,10 @@ public interface IColumn /// Direction of sorting /// bool SortDescending { get; set; } + + /// + /// Horizontal alignment + /// + Align Align { get; set; } } }