Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Table): add FixedLineNoColumn on table #922

Merged
merged 7 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
@inject IStringLocalizer<Foo> LocalizerFoo
@inject IStringLocalizer<TablesAutoRefreshControl> Localizer

<div>
<p>
<div>@Localizer["TablesAutoRefreshControlDescription"]</div>
<Button Text="@Localizer["TablesAutoRefreshControlToggleAuto"]" OnClick="@ToggleAuto" /> <span><code>IsAutoRefresh</code> @Localizer["TablesAutoRefreshControlIsAutoRefresh"]:<code>@IsAutoRefresh</code></span>
</p>
<Table TItem="Foo"
IsPagination="true" PageItemsSource="@(new int[] { 2, 4 })"
IsStriped="true" IsBordered="true" IsMultipleSelect="true"
IsAutoRefresh="@IsAutoRefresh" AutoRefreshInterval="2000"
OnQueryAsync="@OnManualQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" Width="100" />
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Count" />
<TableColumn @bind-Field="@context.Complete" />
</TableColumns>
</Table>
</div>
<p>
<div>@Localizer["TablesAutoRefreshControlDescription"]</div>
<Button Text="@Localizer["TablesAutoRefreshControlToggleAuto"]" OnClick="@ToggleAuto" /> <span><code>IsAutoRefresh</code> @Localizer["TablesAutoRefreshControlIsAutoRefresh"]:<code>@IsAutoRefresh</code></span>
</p
<Table TItem="Foo"
IsPagination="true" PageItemsSource="@(new int[] { 2, 4 })"
IsStriped="true" IsBordered="true" IsMultipleSelect="true"
IsAutoRefresh="@IsAutoRefresh" AutoRefreshInterval="2000"
OnQueryAsync="@OnManualQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" Width="100" />
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Count" />
<TableColumn @bind-Field="@context.Complete" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
@inject IStringLocalizer<Foo> LocalizerFoo

<div>
<Table TItem="Foo"
IsPagination="true" PageItemsSource="@(new int[] { 2, 4 })"
IsStriped="true" IsBordered="true" IsMultipleSelect="true"
IsAutoRefresh="true" AutoRefreshInterval="2000"
OnQueryAsync="@OnAutoQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" Width="100" />
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Count" />
<TableColumn @bind-Field="@context.Complete" />
</TableColumns>
</Table>
</div>
<Table TItem="Foo"
IsPagination="true" PageItemsSource="@(new int[] { 2, 4 })"
IsStriped="true" IsBordered="true" IsMultipleSelect="true"
IsAutoRefresh="true" AutoRefreshInterval="2000"
OnQueryAsync="@OnAutoQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" Width="100" />
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Count" />
<TableColumn @bind-Field="@context.Complete" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
@inject IStringLocalizer<Foo> Localizer

<div>
<Table TItem="Foo" Items="@Items.Take(3)" IsBordered="true">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>
</div>
<Table TItem="Foo" Items="@Items.Take(3)" IsBordered="true">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
@inject IStringLocalizer<Foo> Localizer
@inject IStringLocalizer<TableBaseHeaderStyle> TablesLocalizer

<div>
<div class="code-label"><code>Light</code> @TablesLocalizer["TableBaseHeaderStyleMode"]</div>
<Table TItem="Foo" Items="@Items.Take(3)" HeaderStyle="TableHeaderStyle.Light" IsBordered="true">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>
<div class="code-label mt-3"><code>Dark</code> @TablesLocalizer["TableBaseHeaderStyleMode"]</div>
<Table TItem="Foo" Items="@Items.Take(3)" HeaderStyle="TableHeaderStyle.Dark" IsBordered="true">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>
</div>
<div class="code-label"><code>Light</code> @TablesLocalizer["TableBaseHeaderStyleMode"]</div>
<Table TItem="Foo" Items="@Items.Take(3)" HeaderStyle="TableHeaderStyle.Light" IsBordered="true">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>

<div class="code-label mt-3"><code>Dark</code> @TablesLocalizer["TableBaseHeaderStyleMode"]</div>
<Table TItem="Foo" Items="@Items.Take(3)" HeaderStyle="TableHeaderStyle.Dark" IsBordered="true">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
@inject IStringLocalizer<Foo> Localizer
@inject IStringLocalizer<TableBaseNormal> TablesLocalizer

<div>
<Button Icon="fa-solid fa-arrows-rotate" Text="@RefreshText" OnClick="OnClick" class="my-2" />
<Table TItem="Foo" Items="@Items.Take(3)">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>
</div>
<Button Icon="fa-solid fa-arrows-rotate" Text="@RefreshText" OnClick="OnClick" class="my-2" />

<Table TItem="Foo" Items="@Items.Take(3)">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
@inject IStringLocalizer<Foo> Localizer

<div>
<Table TItem="Foo" Items="@Items.Take(3)" IsBordered="true" IsStriped="true" TableSize="TableSize.Compact">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" Filterable="true" Sortable="true" />
<TableColumn @bind-Field="@context.Name" Filterable="true" />
<TableColumn @bind-Field="@context.Address" Sortable="true" />
</TableColumns>
</Table>
</div>
<Table TItem="Foo" Items="@Items.Take(3)" IsBordered="true" IsStriped="true" TableSize="TableSize.Compact">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" Filterable="true" Sortable="true" />
<TableColumn @bind-Field="@context.Name" Filterable="true" />
<TableColumn @bind-Field="@context.Address" Sortable="true" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
@inject IStringLocalizer<Foo> Localizer

<div>
<Table TItem="Foo" Items="@Items.Take(3)" IsStriped="true">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>
</div>
<Table TItem="Foo" Items="@Items.Take(3)" IsStriped="true">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
@inject IStringLocalizer<Foo> Localizer

<div>
<Table TItem="Foo" Items="@Items.Take(3)">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="140" />
<TableColumn @bind-Field="@context.Name" OnCellRender="@OnCellRenderHandler" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>
</div>
<Table TItem="Foo" Items="@Items.Take(3)">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="140" />
<TableColumn @bind-Field="@context.Name" OnCellRender="@OnCellRenderHandler" />
<TableColumn @bind-Field="@context.Address" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
@inject IStringLocalizer<Foo> FooLocalizer
@inject IStringLocalizer<TableCellOnDoubleClickCell> Localizer

<div>
<Table TItem="Foo" Items="@Items.Take(3)" IsBordered="true" OnDoubleClickCellCallback="@OnDoubleClickCellCallback">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Complete" />
</TableColumns>
</Table>
</div>
<Table TItem="Foo" Items="@Items.Take(3)" IsBordered="true" OnDoubleClickCellCallback="@OnDoubleClickCellCallback">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="180" />
<TableColumn @bind-Field="@context.Name" />
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Complete" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
@inject IStringLocalizer<Foo> FooLocalizer

<div>
<Table TItem="Foo" IsPagination="true" PageItemsSource="@PageItemsSource" RenderMode="TableRenderMode.Table"
IsStriped="true" IsBordered="true" OnQueryAsync="OnQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.Name" Width="220">
<Template Context="value">
<div class="d-flex">
<div>
<img src="@Foo.GetAvatarUrl(value.Row.Id)" class="bb-avatar" />
</div>
<div class="ps-2">
<div>@value.Value</div>
<div class="bb-sub">@value.Row.Address</div>
</div>
<Table TItem="Foo" IsPagination="true" PageItemsSource="@PageItemsSource" RenderMode="TableRenderMode.Table"
IsStriped="true" IsBordered="true" OnQueryAsync="OnQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.Name" Width="220">
<Template Context="value">
<div class="d-flex">
<div>
<img src="@Foo.GetAvatarUrl(value.Row.Id)" class="bb-avatar" />
</div>
</Template>
</TableColumn>
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Education" Align="Alignment.Center" Width="80" />
<TableColumn @bind-Field="@context.Count" Width="160">
<Template Context="value">
<div class="w-100">
<div>@value.Value %</div>
<Progress Value="@value.Value" Color="@Foo.GetProgressColor(value.Value)"></Progress>
<div class="ps-2">
<div>@value.Value</div>
<div class="bb-sub">@value.Row.Address</div>
</div>
</Template>
</TableColumn>
<TableColumn @bind-Field="@context.Complete" Align="Alignment.Center" Width="80" />
</TableColumns>
</Table>
</div>
</div>
</Template>
</TableColumn>
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Education" Align="Alignment.Center" Width="80" />
<TableColumn @bind-Field="@context.Count" Width="160">
<Template Context="value">
<div class="w-100">
<div>@value.Value %</div>
<Progress Value="@value.Value" Color="@Foo.GetProgressColor(value.Value)"></Progress>
</div>
</Template>
</TableColumn>
<TableColumn @bind-Field="@context.Complete" Align="Alignment.Center" Width="80" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
@inject IStringLocalizer<Foo> FooLocalizer

<div>
<Table TItem="Foo"
IsPagination="true" PageItemsSource="@PageItemsSource"
IsStriped="true" IsBordered="true"
ShowToolbar="false" IsMultipleSelect="true" ShowExtendButtons="false"
OnQueryAsync="@OnQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="120" FormatString="yyyy-MM-dd" Align="Alignment.Center" />
<TableColumn @bind-Field="@context.Name" Width="100" />
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Count" Formatter="@IntFormatter" Width="60" Align="Alignment.Right" />
</TableColumns>
</Table>
</div>
<Table TItem="Foo"
IsPagination="true" PageItemsSource="@PageItemsSource"
IsStriped="true" IsBordered="true"
ShowToolbar="false" IsMultipleSelect="true" ShowExtendButtons="false"
OnQueryAsync="@OnQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="120" FormatString="yyyy-MM-dd" Align="Alignment.Center" />
<TableColumn @bind-Field="@context.Name" Width="100" />
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Count" Formatter="@IntFormatter" Width="60" Align="Alignment.Right" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
@inject IStringLocalizer<Foo> FooLocalizer

<div>
<Table TItem="Foo"
IsPagination="true" PageItemsSource="@PageItemsSource" AllowResizing="true"
IsStriped="true" IsBordered="true"
ShowToolbar="false" IsMultipleSelect="true" ShowExtendButtons="false"
OnQueryAsync="@OnQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="120" FormatString="yyyy-MM-dd" />
<TableColumn @bind-Field="@context.Name" Width="100" />
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Count" />
</TableColumns>
</Table>
</div>
<Table TItem="Foo"
IsPagination="true" PageItemsSource="@PageItemsSource" AllowResizing="true"
IsStriped="true" IsBordered="true"
ShowToolbar="false" IsMultipleSelect="true" ShowExtendButtons="false"
OnQueryAsync="@OnQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="120" FormatString="yyyy-MM-dd" />
<TableColumn @bind-Field="@context.Name" Width="100" />
<TableColumn @bind-Field="@context.Address" />
<TableColumn @bind-Field="@context.Count" />
</TableColumns>
</Table>

@code {
/// <summary>
Expand Down
Loading