mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-11-29 18:49:08 +08:00
!2836 fix(#I59SLY): add column list null check
* chore: bump version 6.6.19 * fix: 增加列设置保护 * revert: 撤销对子类可见
This commit is contained in:
parent
4e776fedfe
commit
f41e44783f
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>6.6.18</Version>
|
||||
<Version>6.6.19</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
|
||||
|
@ -72,12 +72,15 @@
|
||||
<div class="dropdown-menu dropdown-menu-right shadow">
|
||||
@foreach (var item in Columns)
|
||||
{
|
||||
var poco = ColumnVisibles.First(i => i.FieldName == item.GetFieldName());
|
||||
<div class="dropdown-item">
|
||||
<Checkbox ShowAfterLabel="true" IsDisabled="@GetColumnsListState(item)"
|
||||
var poco = ColumnVisibles.FirstOrDefault(i => i.FieldName == item.GetFieldName());
|
||||
if (poco != null)
|
||||
{
|
||||
<div class="dropdown-item">
|
||||
<Checkbox ShowAfterLabel="true" IsDisabled="@GetColumnsListState(item)"
|
||||
DisplayText="@item.GetDisplayName()" @bind-Value="@poco.Visible">
|
||||
</Checkbox>
|
||||
</div>
|
||||
</Checkbox>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -216,7 +216,7 @@ public partial class Table<TItem>
|
||||
/// <summary>
|
||||
/// 获得/设置 各列是否显示状态集合
|
||||
/// </summary>
|
||||
protected List<ColumnVisibleItem> ColumnVisibles { get; } = new();
|
||||
private List<ColumnVisibleItem> ColumnVisibles { get; } = new();
|
||||
|
||||
private class ColumnVisibleItem
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user